diff options
author | vmarchaud <contact@vmarchaud.fr> | 2019-06-02 13:33:47 +0200 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2019-07-01 16:02:17 +0200 |
commit | 6271ef005eb311c819b7ab041e09f50e4155ec1e (patch) | |
tree | e16ef8aa0f1db3fcdcd6cd1405ddf4412da18a2d /lib/internal/bootstrap | |
parent | 20d099af7a1fc103ecfb9a4afe59fd2fdcbe7802 (diff) | |
download | android-node-v8-6271ef005eb311c819b7ab041e09f50e4155ec1e.tar.gz android-node-v8-6271ef005eb311c819b7ab041e09f50e4155ec1e.tar.bz2 android-node-v8-6271ef005eb311c819b7ab041e09f50e4155ec1e.zip |
process: expose uv_rusage on process.resourcesUsage()
As discussed in https://github.com/nodejs/diagnostics/issues/161,
the core should expose important metrics about the runtime, this PR's
goal is to let user get the number of io request made, and lower level
mertrics like the page faults and context switches.
PR-URL: https://github.com/nodejs/node/pull/28018
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'lib/internal/bootstrap')
-rw-r--r-- | lib/internal/bootstrap/node.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/internal/bootstrap/node.js b/lib/internal/bootstrap/node.js index e8735c2049..86b2164bb0 100644 --- a/lib/internal/bootstrap/node.js +++ b/lib/internal/bootstrap/node.js @@ -110,6 +110,7 @@ if (isMainThread) { process.hrtime = wrapped.hrtime; process.hrtime.bigint = wrapped.hrtimeBigInt; process.cpuUsage = wrapped.cpuUsage; + process.resourceUsage = wrapped.resourceUsage; process.memoryUsage = wrapped.memoryUsage; process.kill = wrapped.kill; process.exit = wrapped.exit; |