process: expose uv_rusage on process.resourceUsage()
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 metrics like the page faults and context switches.
The
Concerning the tests, i didn't really tested the output of the function mainly because it might make the test flaky depending on the platform and runtime behavior.make -j4 test
are not passing locally because of a failing test test/parallel/test-worker-prof.js
but i believe it's not related to my changes.
This is my first PR on the core, so i might have forgotten some requirements.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines