https://github.com/bripkens/event-loop-stats
Exposes stats about the libuv default loop
https://github.com/bripkens/event-loop-stats
Last synced: 3 months ago
JSON representation
Exposes stats about the libuv default loop
- Host: GitHub
- URL: https://github.com/bripkens/event-loop-stats
- Owner: bripkens
- License: mit
- Created: 2015-10-11T06:29:08.000Z (over 10 years ago)
- Default Branch: main
- Last Pushed: 2025-02-19T13:41:50.000Z (over 1 year ago)
- Last Synced: 2025-03-13T04:02:19.194Z (over 1 year ago)
- Language: C++
- Size: 96.7 KB
- Stars: 34
- Watchers: 4
- Forks: 15
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
event-loop-stats
Exposes stats about the libuv default loop
## Installation
```
npm install --save event-loop-stats
```
## Usage
```javascript
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](https://travis-ci.org/bripkens/event-loop-stats).