Skip to content

Instantly share code, notes, and snippets.

@mmcgrana
Created February 1, 2011 12:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mmcgrana/805776 to your computer and use it in GitHub Desktop.
Save mmcgrana/805776 to your computer and use it in GitHub Desktop.
var sys = require('sys');
var fleetdb = require('./fleetdb');
var db = new fleetdb.Database();
db.open('http://127.0.0.1:3400');
var done = 0;
setInterval(function() {
if (done == 100000) {
sys.puts('all done');
db.close();
}
}, 100);
for(var i=0; i<100000; i++) {
db.query(['ping'], function(status, data) {
done += 1
if ((done % 10000) == 0) {
sys.puts('done: ' + done);
}
});
};
sys.puts('all enqueued');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment