Added average times per operation

pull/2/head
Louis Chatriot 12 years ago
parent cf2f1db9bd
commit 2c59251f16
  1. 1
      benchmarks/find.js
  2. 1
      benchmarks/insert.js

@ -61,6 +61,7 @@ async.waterfall([
if (i === n) { // Finished if (i === n) { // Finished
var timeTaken = (new Date()).getTime() - beg.getTime(); // In ms var timeTaken = (new Date()).getTime() - beg.getTime(); // In ms
console.log("Time taken: " + (timeTaken / 1000) + "s"); console.log("Time taken: " + (timeTaken / 1000) + "s");
console.log("Average time to find docs in a collection of " + n + " documents: " + (timeTaken / n) + "ms");
return cb(); return cb();
} }

@ -38,6 +38,7 @@ async.waterfall([
if (i === n) { // Finished if (i === n) { // Finished
var timeTaken = (new Date()).getTime() - beg.getTime(); // In ms var timeTaken = (new Date()).getTime() - beg.getTime(); // In ms
console.log("Time taken: " + (timeTaken / 1000) + "s"); console.log("Time taken: " + (timeTaken / 1000) + "s");
console.log("Average time for one insert: " + (timeTaken / n) + "ms");
return cb(); return cb();
} }

Loading…
Cancel
Save