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 = {
timeout: 1,
var aerospike = require('aerospike')
var policy = aerospike.Policy;
var log = aerospike.Log;
// environment settings
var env = {
host: { addr: "192.168.5.102", port: 3000},
namespace: "test",
set: "demo",
nops: 1000 * 1
};
// client settings
env.config = {
// server address - host and port
hosts: [ env.host ],
log : {
level : log.INFO
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++ ) {
var key0 = {