0.1.0 • Published 9 years ago
evloop-monitor v0.1.0
Eventloop Monitor
Yet another package to watch the eventloop usage. Unlike other package, this package gives the percentage of blockness by default.
Installation
npm i --save evloop-monitor
Usage
var EventLoopMonitor = require('evloop-monitor');
// watch the eventloop monitor for every 200 milliseconds
var monitor = new EventLoopMonitor(200);
monitor.start();
// let's get the status
setInterval(function() {
console.log(monitor.status());
// output an object like:
// {pctBlock: 40.87, elapsedTime: 2031, totalLag: 830.06}
}, 2000);
Note: monitor.status()
reset the previous lag times.
0.1.0
9 years ago