Skip to content
Browse files

Timer.timeUnit implemented

  • Loading branch information...
1 parent d8ab67e commit 064ed7cf64d29af1d2d1828397dbbad3948fb842 @penartur committed May 5, 2012
Showing with 9 additions and 4 deletions.
  1. +2 −1 lib/benchmark-context.js
  2. +4 −3 lib/statistics-display.js
  3. +3 −0 lib/timers/datetimer.js
View
3 lib/benchmark-context.js
@@ -46,7 +46,8 @@ BenchmarkContext.prototype.onDone = function () {
}
this.done(this.simultaneousRequests, {
perPage: perPage,
- totals: this.totals
+ totals: this.totals,
+ timers: this.benchmark.timers
});
};
View
7 lib/statistics-display.js
@@ -5,13 +5,14 @@ exports.showCliTable = function (simultaneousRequests, stats) {
engineName,
pageName,
entry,
- Table = require('cli-table');
+ Table = require('cli-table'),
+ timeUnit = stats.timers.unit;
console.log("Statistics for " + simultaneousRequests + " simultaneous requests");
for (engineName in stats.totals) {
console.log(
- "Processing " + engineName + " took " + stats.totals[engineName].time +
- " (" + (stats.totals[engineName].time / stats.totals[engineName].tasks) + " per request)"
+ "Processing " + engineName + " took " + stats.totals[engineName].time + timeUnit +
+ " (" + (stats.totals[engineName].time / stats.totals[engineName].tasks) + timeUnit + " per request)"
);
}
for (pageName in stats.perPage) {
View
3 lib/timers/datetimer.js
@@ -8,3 +8,6 @@ exports.start = function () {
}
};
};
+
+exports.unit = "ms";
+

0 comments on commit 064ed7c

Please sign in to comment.
Something went wrong with that request. Please try again.