super light benchmarking tool designed to leave in long running server code.
var bench = require('./bench.js')
var b = bench();
var c = 0;
(function fn(){
c++;
b.start('test');
setTimeout(function(){
b.end('test');
if(c < 150) fn();
else console.log(b.report());
},10+(+((''+Math.random()).substr(4,2))));
}());
bench()
bench.start(key)
bench.end(key) / bench.stop(key)
bench.report()
bench.remove(key)
{ test:
{ count: 60,
avg: 0.05,
slidingAvg: 0.0682593545,
total: [ 3, 906278613 ] } }
let me know if you have any issues or this is useful.