Creates an instance of the class and initializes the event loop delay histogram.
The sampling resolution in milliseconds for monitoring the event loop delay.
Defaults to DEFAULT_RESOLUTION
if not provided.
Captures the current event loop delay statistics and stores the computed value in the provided context.
The event loop delay is calculated as the mean value from the internal histogram (converted from nanoseconds to milliseconds) minus the configured resolution. If the computed delay is not a number (NaN), it is set to positive infinity. After capturing, the histogram is reset for the next measurement cycle.
The context object where the event loop delay metric will be set.
A plugin that monitors and records the event loop delay using a histogram.
The
EventLoopDelayPlugin
utilizes Node.js'smonitorEventLoopDelay
to track the event loop's responsiveness. On each capture, it records the mean event loop delay (in milliseconds, adjusted by the resolution) into the provided context. If the delay cannot be determined, it sets the value toInfinity
.Implements