interface Internal<T> {
    observe(value): void;
    startTimer(): ((labels?) => void);
}

Type Parameters

  • T extends string

Methods

  • Observe value

    Parameters

    • value: number

      The value to observe

    Returns void

  • Start a timer. Calling the returned function will observe the duration in seconds in the histogram.

    Returns ((labels?) => void)

    Function to invoke when timer should be stopped. The value it returns is the timed duration.

      • (labels?): void
      • Parameters

        • Optional labels: Partial<Record<T, string | number>>

        Returns void