Measure the duration of JS code segments and keep stats
npm install measureThis simple module mesures the duration of javascript operations.
``javascript
var measure = require('measure');
var done = measure.measure('timeconsumingoperation');
setTimeout(function() {
var duration = done();
console.log(duration); // ~1000
}, 1000);
`
Start the measurement using the string `key``
Returns a function to be called when the measurement is complete.
Return the statistics for the given key or statistics for all keys if none is given.
Clear stats for the given key or all keys if none is given.
npm install measure
mocha tests/measure.test.js --reporter spec
MIT/X11