Skip to content

bripkens/event-loop-stats

Folders and files

NameName
Last commit message
Last commit date

Latest commit

f09ba92 · Jun 16, 2024

History

27 Commits
Jan 21, 2022
Jan 20, 2022
Jan 20, 2022
Oct 11, 2015
Oct 11, 2015
Oct 11, 2015
Jan 21, 2022
Jan 21, 2022
Jan 21, 2022
Oct 11, 2015
Oct 11, 2015
Jun 16, 2024
Mar 2, 2023

Repository files navigation

event-loop-stats

Exposes stats about the libuv default loop

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.