From 2c59251f16bd0b5d663c6a62f18f0f353a33fc96 Mon Sep 17 00:00:00 2001 From: Louis Chatriot Date: Fri, 3 May 2013 00:50:20 +0200 Subject: [PATCH] Added average times per operation --- benchmarks/find.js | 1 + benchmarks/insert.js | 1 + 2 files changed, 2 insertions(+) diff --git a/benchmarks/find.js b/benchmarks/find.js index bfc369b..7583cbd 100644 --- a/benchmarks/find.js +++ b/benchmarks/find.js @@ -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(); } diff --git a/benchmarks/insert.js b/benchmarks/insert.js index cb222ee..cc9273a 100644 --- a/benchmarks/insert.js +++ b/benchmarks/insert.js @@ -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(); }