Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MultiStageTimer

Measures a sequence of connected events, such as multiple processing stages in a function.

remarks

Each stage is identified with a timer name, that must be a valid timer in the statistics object. Additionally, all timers within a MultiStageTimer must be unique.

Internally, the MultiStageTimer manages a list of timers where at the end of each stage, one timer stops and the next timer starts.

internal

Hierarchy

  • MultiStageTimer

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

Properties

Readonly name

name: string

Name of this MultiStageTimer.

stages

stages: string[]

List of timer names.

Accessors

stage

  • get stage(): string | undefined
  • set stage(stage: string | undefined): void
  • Gets the current stage.

    Returns string | undefined

  • Sets the current stage. If a new stage is provided, the current timer (if available) is stopped, and the next timer is started. If the timer in the next stage is undefined, this is equivalent to calling stop on the MultiStageTimer.

    Parameters

    • stage: string | undefined

      The next stage to start.

    Returns void

value

  • get value(): number | undefined

Methods

reset

  • reset(): void

start

  • start(): number

stop

  • stop(): number

Generated using TypeDoc