Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var env = require('./env')
var aerospike = require('aerospike')
var status = aerospike.Status
var policy = aerospike.Policy
var client = aerospike.client(env.config)
//Connect call is necessary for info_cluster call.
client = client.connect()
if (client === null)
{
console.log("Client object is null \n ---Application Exiting --- ")
process.exit(1)
}
/* infopolicy is an optional argument
* If infopolicy is not passed, default value is used
* */
var infopolicy = {
// Benchmarking put operation.
var optimist = require('optimist')
var aerospike = require('aerospike')
var status = aerospike.Status
/***********************************************************************
*
* Options Parsing
*
***********************************************************************/
var argp = optimist
.usage("$0 [options]")
.options({
help: {
boolean: true,
describe: "Display this message."
},
host: {
alias: "h",
default: "127.0.0.1",
// Benchmarking put operation.
var optimist = require('optimist')
var aerospike = require('aerospike')
var status = aerospike.Status
/***********************************************************************
*
* Options Parsing
*
***********************************************************************/
var argp = optimist
.usage("$0 [options]")
.options({
help: {
boolean: true,
describe: "Display this message."
},
host: {
alias: "h",
default: "127.0.0.1",
var env = require('./env')
var aerospike = require('aerospike')
var status = aerospike.Status
var policy = aerospike.Policy
var client = aerospike.client(env.config)
client = client.connect()
if (client === null)
{
console.log("Client object is null \n ---Application Exiting --- ")
process.exit(1)
}
var n = env.nops
var m = 0
console.time(n + " put+get")
for (var i = 0; i < n; i++ ) {