Measure the duration of JS code segments and keep stats
var measure = require'measure';var done = measuremeasure'timeconsumingoperation';setTimeoutvar duration = done;console.logduration; // ~10001000;
Start the measurement using the string
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