eventloop-info

Detects and measures the latency of the NodeJS event loop


Keywords
event, loop, latency, process, block, performance
License
ISC
Install
npm install eventloop-info@1.0.0

Documentation

eventloop-info

Detects and measures the latency of the NodeJS event loop


Build StatusCode Coverage 100%ISC LicenseNodeJS

JavaScript Style Guide

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
})

ISC License (ISC)