On this page

    M

    perf_hooks.createHistogram

    History
    perf_hooks.createHistogram(options?): RecordableHistogram
    Attributes
    options:Object
    lowest?:number | bigint
    The lowest discernible value. Must be an integer value greater than 0. Default: 1.
    highest?:number | bigint
    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?:number
    The number of accuracy digits. Must be a number between 1 and 5. Default: 3.
    halfLife?:number
    The 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?:number
    An 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 a RecordableHistogram.