M
perf_hooks.createHistogram
History
Added in: v15.9.0, v14.18.0
v15.9.0, v14.18.0
Introduced in: v8.5.0
v8.5.0
perf_hooks.createHistogram(options?): RecordableHistogram
Attributes
options:
ObjectThe lowest discernible value. Must be an integer
value greater than 0. Default:
1.The highest recordable value. Must be an integer
value that is equal to or greater than two times
lowest.
Default: Number.MAX_SAFE_INTEGER.figures?:
numberThe number of accuracy digits. Must be a number between
1 and 5. Default: 3.halfLife?:
numberThe EWMA half-life in number of samples. When set to
a value greater than 0, the histogram tracks an exponentially weighted
moving average and standard deviation, accessible via
histogram.ewmaMean and histogram.ewmaStddev. After halfLife
recordings, a value's influence has decayed to 50%. Default: 0
(disabled).threshold?:
numberAn SLO threshold value. When set together with
halfLife, the histogram tracks a smoothed error rate for values
exceeding this threshold, accessible via histogram.ewmaErrorRate and
histogram.burnRate(). Default: 0 (disabled).Returns:
RecordableHistogramReturns a RecordableHistogram.