Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Measurement

A Measurement counts the time elapsed between its creation when the Stopwatch is started and when it is stopped.

Hierarchy

  • Measurement

Index

Properties

elapsed?: number

The elapsed time measured, if it has been stopped and measured, or NaN if the platform disabled performance measurement.

name: string

The measurement name. This may show up in the performance measurement framework appropriate to the application context.

Methods

  • debug(detail: string, ...optionalArgs: any[]): void
  • Compute the elapsed time and log a debug message annotated with that timing information.

    Parameters

    • detail: string

      a message detailing what activity was measured

    • Rest ...optionalArgs: any[]

      optional message arguments as per the usual console API

    Returns void

  • error(detail: string, ...optionalArgs: any[]): void
  • Compute the elapsed time and log an error message annotated with that timing information.

    Parameters

    • detail: string

      a message detailing what activity was measured

    • Rest ...optionalArgs: any[]

      optional message arguments as per the usual console API

    Returns void

  • info(detail: string, ...optionalArgs: any[]): void
  • Compute the elapsed time and log an info message annotated with that timing information.

    Parameters

    • detail: string

      a message detailing what activity was measured

    • Rest ...optionalArgs: any[]

      optional message arguments as per the usual console API

    Returns void

  • log(detail: string, ...optionalArgs: any[]): void
  • Compute the elapsed time and log a message annotated with that timing information. The message is logged at the level determined by the MeasurementOptions.

    Parameters

    • detail: string

      a message detailing what activity was measured

    • Rest ...optionalArgs: any[]

      optional message arguments as per the usual console API

    Returns void

  • stop(): number
  • Compute the elapsed time, in milliseconds, if not already done (only has effect on the first invocation). A NaN result indicates that the watch was stopped but failed to make a measurement.

    Returns number

  • warn(detail: string, ...optionalArgs: any[]): void
  • Compute the elapsed time and log a warning message annotated with that timing information.

    Parameters

    • detail: string

      a message detailing what activity was measured

    • Rest ...optionalArgs: any[]

      optional message arguments as per the usual console API

    Returns void