interface
perf_hooks.ELDHistogram
interface ELDHistogram
A Histogram that records event loop delay, returned by perf_hooks.monitorEventLoopDelay().
- readonly exceeds: number
The number of times the event loop delay exceeded the maximum 1 hour event loop delay threshold.
- readonly exceedsBigInt: bigint
The number of times the event loop delay exceeded the maximum 1 hour event loop delay threshold.
- readonly percentiles: Map<number, number>
Returns a
Mapobject detailing the accumulated percentile distribution. - readonly percentilesBigInt: Map<bigint, bigint>
Returns a
Mapobject detailing the accumulated percentile distribution. Disables event loop delay sampling when the histogram is disposed.
const { monitorEventLoopDelay } = require('node:perf_hooks'); { using hist = monitorEventLoopDelay({ resolution: 20 }); hist.enable(); // The histogram will be disabled when the block is exited. }Disables event loop delay sampling. Returns
trueif sampling was stopped,falseif it was already stopped.Enables event loop delay sampling. Returns
trueif sampling was started,falseif it was already started.- @param percentile
A percentile value in the range (0, 100].
- @param percentile
A percentile value in the range (0, 100].
Resets the collected histogram data.