eventloop-info

1.0.0 • Public • Published

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)

Package Sidebar

Install

npm i eventloop-info

Weekly Downloads

2

Version

1.0.0

License

ISC

Last publish

Collaborators

  • quim