You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

31 lines
638 B

'use strict';
var redis = require('redis'),
client = redis.createClient('/tmp/redis.sock'),
profiler = require('v8-profiler');
client.on('connect', function () {
console.log('Got Unix socket connection.');
});
client.on('error', function (err) {
console.log(err.message);
});
client.set('space chars', 'space value');
setInterval(function () {
client.get('space chars');
}, 100);
function done() {
client.info(function (err, reply) {
console.log(reply.toString());
client.quit();
});
}
setTimeout(function () {
console.log('Taking snapshot.');
profiler.takeSnapshot();
}, 5000);