Skip to content

Commit

Permalink
Added average times per operation
Browse files Browse the repository at this point in the history
  • Loading branch information
louischatriot committed May 2, 2013
1 parent cf2f1db commit 2c59251
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions benchmarks/find.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ async.waterfall([
if (i === n) { // Finished
var timeTaken = (new Date()).getTime() - beg.getTime(); // In ms
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();
}

Expand Down
1 change: 1 addition & 0 deletions benchmarks/insert.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ async.waterfall([
if (i === n) { // Finished
var timeTaken = (new Date()).getTime() - beg.getTime(); // In ms
console.log("Time taken: " + (timeTaken / 1000) + "s");
console.log("Average time for one insert: " + (timeTaken / n) + "ms");
return cb();
}

Expand Down

0 comments on commit 2c59251

Please sign in to comment.