diff --git a/doc/api/perf_hooks.md b/doc/api/perf_hooks.md index 00b52d96889c61..97bcad3464f3cb 100644 --- a/doc/api/perf_hooks.md +++ b/doc/api/perf_hooks.md @@ -463,6 +463,23 @@ console.log(h.percentile(50)); console.log(h.percentile(99)); ``` +## `perf_hooks.monitorEventLoopIdleness([options])` + + +* `options` {Object} + * `resolution` {number} The sampling rate in milliseconds. Must be greater + than zero. **Default:** `10`. +* Returns: {Histogram} + +Creates a `Histogram` object that samples and reports the event loop idleness +over time (time difference between IO poll start and poll end). The idleness +will be reported in nanoseconds. + +The behavior of `monitorEventLoopIdleness` is identical to +[`monitorEventLoopDelay`][] above. + ### Class: `Histogram`