Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add runtime metrics #482

Merged
merged 47 commits into from
Mar 18, 2019
Merged

add runtime metrics #482

merged 47 commits into from
Mar 18, 2019

Conversation

rochdev
Copy link
Member

@rochdev rochdev commented Mar 12, 2019

This PR adds runtime metrics that are captured every 10 seconds. The feature is behind an experimental flag until it will have been finalized.

The following groups of metrics are captured:

  • CPU utilization
  • Memory usage
  • Heap statistics
  • Heap space statistics
  • Event loop statistics
  • Garbage collector statistics
  • Process uptime

A runtime ID was added to both the traces and the metrics so that we can correlate them in a later version.

For the moment, the following limitations exist:

  • Prebuilt binaries are not published, so the C++ add-on is built on the machine running npm install.
  • Compilation is only tested on the official Docker Node images.
  • Network statistics are not available.
  • File system statistics are not available.

@rochdev rochdev added enhancement New feature or request core labels Mar 12, 2019
@rochdev rochdev added this to the 0.11.0 milestone Mar 12, 2019
Copy link

@willgittoes-dd willgittoes-dd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me :)

src/native/metrics/main.cpp Outdated Show resolved Hide resolved
Copy link

@pawelchcki pawelchcki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small suggestion to stop the callback once EventLoop is deleted. Otherwise looks great!

src/native/metrics/EventLoop.cpp Show resolved Hide resolved
src/platform/node/metrics.js Outdated Show resolved Hide resolved
src/platform/node/metrics.js Outdated Show resolved Hide resolved
@rochdev rochdev merged commit ae31a23 into v0.11.0 Mar 18, 2019
@rochdev rochdev deleted the runtime-metrics branch March 18, 2019 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants