On this page

C

RecordableHistogram extends Histogram

History
M

histogram.add

History
histogram.add(other): void
Attributes

Adds the values from other to this histogram.

M

histogram.record

History
histogram.record(val): void
Attributes
The amount to record in the histogram. Must be an integer greater than or equal to 0.

Values smaller than the histogram's lowest option, including 0, might not be distinguishable from each other.

M

histogram.recordDelta

History
histogram.recordDelta(): void

Calculates the amount of time (in nanoseconds) that has passed since the previous call to recordDelta() and records that amount in the histogram.

histogram.recordCorrected(val, expectedInterval): void
Attributes
The value to record. Must be an integer greater than or equal to 0.
expectedInterval:number | bigint
The expected recording interval.

Records a value with coordinated omission correction. When a system stall prevents timely recording, this method backfills intermediate values at expectedInterval steps between the previously recorded value and val. This compensates for measurement gaps that would otherwise underrepresent latency.

M

histogram.subtract

History
histogram.subtract(other): void
Attributes

Subtracts the values of other from this histogram. Both histograms should have compatible configurations. Bucket counts that would become negative are clamped to zero. Increments histogram.resetCount.