A tracked metric loosely based on the interfaces exposed by the prom-client module

Hierarchy

  • Metric

Properties

decrement: ((value?: number) => void)

Type declaration

    • (value?: number): void
    • Decrement the metric by the passed value or 1

      Parameters

      • Optional value: number

      Returns void

increment: ((value?: number) => void)

Type declaration

    • (value?: number): void
    • Increment the metric by the passed value or 1

      Parameters

      • Optional value: number

      Returns void

reset: (() => void)

Type declaration

    • (): void
    • Reset this metric to its default value

      Returns void

timer: (() => StopTimer)

Type declaration

    • (): StopTimer
    • Start a timed metric, call the returned function to stop the timer

      Returns StopTimer

update: ((value: number) => void)

Type declaration

    • (value: number): void
    • Update the stored metric to the passed value

      Parameters

      • value: number

      Returns void