duration-log

0.0.5 • Public • Published

duration-log

Install

npm install duration-log

Examples

var Duration = require('duration-log');

var duration = new Duration();
 
dataset.forEach(function(item){
    var d = duration.start("ProcessA");
    //hervey process here
    d.stop();
    
    d = duration.start("ProcessB");
    //heavy process here
    d.stop();
});

console.log(JSON.stringify(sumup));

// OUTPUT (msec)
// {"ProcessA":1043, "ProcessB":1093}

Readme

Keywords

none

Package Sidebar

Install

npm i duration-log

Weekly Downloads

2

Version

0.0.5

License

MIT

Last publish

Collaborators

  • abarth500