eventloop-info
v1.0.0
Published
Detects and measures the latency of the NodeJS event loop
Downloads
5
Maintainers
Readme
eventloop-info
Detects and measures the latency of the NodeJS event loop
api
eventLoopInfo(function(err, delay, addInfo), [threshold])
fn callback
- err, error object, currently we aren't handle or passing errors just follwing the NodeJS standards
- delay integer, returns the event loop delay in ms
- addInfo js object, returns an object with memory and cpu usage at the time of the blocking/delay op
threshold integer, used to set up the amount of ms to execute the fn callback, default to 10 ms
example
const eventLoopInfo = require('eventloop-info')
//
eventLoopInfo((err, delay, addInfo) => {
// delay in ms
// addInfo an js object with memory and cpu usage
})