https://github.com/keymetrics/node-runtime-stats
A module that forwards stats from NodeJS runtime
https://github.com/keymetrics/node-runtime-stats
Last synced: 16 days ago
JSON representation
A module that forwards stats from NodeJS runtime
- Host: GitHub
- URL: https://github.com/keymetrics/node-runtime-stats
- Owner: keymetrics
- License: mit
- Created: 2018-11-26T13:15:43.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T17:28:40.000Z (over 2 years ago)
- Last Synced: 2024-04-27T00:42:32.126Z (12 months ago)
- Language: C++
- Homepage: https://pm2.io/enterprise
- Size: 207 KB
- Stars: 8
- Watchers: 3
- Forks: 4
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @pm2/node-runtime-stats
## How does it work?
You can see most of the implementation details in `src/nativeStats.cc`. The plugin sets callbacks
around GC invocations, and during the `prepare` and `check` phases of the event loop, tracks the
amount of time spent in each.## Metrics collected
```json
{
"gc": {
"collections": 0,
"pause": 0,
"oldCollections": 0,
"oldPause": 0,
"youngCollections": 0,
"youngPause": 0
},
// duration of event loop tick
"ticks": [
20,
10
]
}
```## Source
Inspired from https://github.com/heroku/heroku-nodejs-plugin