Bun

interface

perf_hooks.RecordableHistogram

interface RecordableHistogram

  • readonly count: number

    The number of samples recorded by the histogram.

  • readonly countBigInt: bigint

    The number of samples recorded by the histogram. v17.4.0, v16.14.0

  • readonly exceeds: number

    The number of times the event loop delay exceeded the maximum 1 hour event loop delay threshold.

  • readonly exceedsBigInt: bigint

    The number of times the event loop delay exceeded the maximum 1 hour event loop delay threshold.

  • readonly max: number

    The maximum recorded event loop delay.

  • readonly maxBigInt: number

    The maximum recorded event loop delay. v17.4.0, v16.14.0

  • readonly mean: number

    The mean of the recorded event loop delays.

  • readonly min: number

    The minimum recorded event loop delay.

  • readonly minBigInt: bigint

    The minimum recorded event loop delay. v17.4.0, v16.14.0

  • readonly percentiles: Map<number, number>

    Returns a Map object detailing the accumulated percentile distribution.

  • readonly percentilesBigInt: Map<bigint, bigint>

    Returns a Map object detailing the accumulated percentile distribution.

  • readonly stddev: number

    The standard deviation of the recorded event loop delays.

  • ): void;

    Adds the values from other to this histogram.

  • percentile: number
    ): number;

    Returns the value at the given percentile.

    @param percentile

    A percentile value in the range (0, 100].

  • percentile: number
    ): bigint;

    Returns the value at the given percentile.

    @param percentile

    A percentile value in the range (0, 100].

  • val: number | bigint
    ): void;
    @param val

    The amount to record in the 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.

  • reset(): void;

    Resets the collected histogram data.