diff options
author | Trevor Norris <trev.norris@gmail.com> | 2020-08-25 22:36:37 +0300 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2020-08-29 17:02:31 +0300 |
commit | 589b2a1244da2f04843652bda97ef55397cdf5b7 (patch) | |
tree | 7b4e1c235a42fa5e0db6ff00c6a19a32238a952a /benchmark/README.md | |
parent | 47f4080db4c16d6433be7f16e67fccef020c2e5d (diff) |
perf_hooks: add idleTime and event loop util
Use uv_metrics_idle_time() to return a high resolution millisecond timer
of the amount of time the event loop has been idle since it was
initialized.
Include performance.eventLoopUtilization() API to handle the math of
calculating the idle and active times. This has been added to prevent
accidental miscalculations of the event loop utilization. Such as not
taking into consideration offsetting nodeTiming.loopStart or timing
differences when being called from a Worker thread.
PR-URL: https://github.com/nodejs/node/pull/34938
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Adrian Estrada <edsadr@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Diffstat (limited to 'benchmark/README.md')
-rw-r--r-- | benchmark/README.md | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/benchmark/README.md b/benchmark/README.md index 6a40d7af3e1..dc02db4abd8 100644 --- a/benchmark/README.md +++ b/benchmark/README.md @@ -32,6 +32,7 @@ directory, see [the guide on benchmarks](../doc/guides/writing-and-running-bench | module | Benchmarks for the `module` subsystem. | | net | Benchmarks for the `net` subsystem. | | path | Benchmarks for the `path` subsystem. | +| perf_hooks | Benchmarks for the `perf_hooks` subsystem. | | process | Benchmarks for the `process` subsystem. | | querystring | Benchmarks for the `querystring` subsystem. | | streams | Benchmarks for the `streams` subsystem. | |