Simple chronometer
Chronode
chronode is a very simple chronometer to evaluate your algorithms perfs.
How to use
First install it as a dependency
$ npm install -S chronode
Now you can start to use it :
const chronode = ;chronodestart'My measurement';;
It should give you something like this :
**************************************
* Measurement result *
**************************************
# My measurement
+ Started at : 15:47:58.848
+ Stopped at : 15:47:59.152
> First timeout : 203ms (66.8%)
> Second timeout : 50ms (16.4%)
> Third timeout : 40ms (13.2%)
> Last timeout : 11ms (3.6%)
+ Total time : 304ms
Here are the functions you can use :
- getMeasurement(measurementName) : return an measurement object.
- start(measurementName) : start a new measurement.
- step(measurementName, stepName) : add a new step to the given measurement.
- stop(measurementName, stepName) : stop the given measurement and add the final step.
- print(measurementName) : pretty print the measurement.
measurement object looks like this :