包详细信息

event-loop-stats

bripkens188.3kMIT1.4.1

Exposes stats about the libuv default loop

libuv, stats, monitoring, loop

自述文件

event-loop-stats

Exposes stats about the libuv default loop

Build Status

Installation

npm install --save event-loop-stats

Usage

var eventLoopStats = require('event-loop-stats');
console.log('Stats', eventLoopStats.sense());

This will print the following information:

Stats {
  max: 5,
  min: 0,
  sum: 10,
  num: 5
}

Property insights

  • max: Maximum number of milliseconds spent in a single loop since last sense call.
  • min: Minimum number of milliseconds spent in a single loop since last sense call.
  • sum: Total number of milliseconds spent in the loop since last sense call.
  • num: Total number of loops since last sense call.

Node version compatibility

event-loop-stats depends on C++ extensions which are compiled when the event-loop-stats module is installed. Compatibility information can be inspected via the Travis-CI build jobs.

更新日志

Changelog

1.4.1

  • Fix issues caused by uv_hrtime() returning a value that is greater than the max possible uint32 value.

1.4.0

  • Expose TypeScript types.

1.3.0

  • Detect synchronous blocks

1.2.0

  • Support Node.js v12

1.1.0

  • Support Node.js v10

1.0.0

  • Initial release