Records values into a lazily rotated ring of histogram chunks. Instances are
created using perf_hooks.createSlidingWindowHistogram() and cannot be
constructed directly. A SlidingWindowHistogram does not extend Histogram;
call snapshot() to materialize the current window as a Histogram.
SlidingWindowHistogram instances cannot be cloned or transferred through a
MessagePort.
slidingWindowHistogram.record(val): void
Records val in the current chunk. For a count-based window, every call that
reaches the native histogram counts toward rotation, including values which
exceed the configured highest value.
slidingWindowHistogram.reset(): void
Invalidates all chunks in the current window. Allocated chunks are reset lazily when reused.
slidingWindowHistogram.snapshot(): Histogram
HistogramMaterializes the current window as a new, independent Histogram. Values
recorded or expired after this method returns do not change the returned
histogram. Materialization allocates one histogram and merges every retained
chunk.