Options
All
  • Public
  • Public/Protected
  • All
Menu

Performance monitor tracks rolling average frame-time and frame-time variance over a user defined sliding-window

Hierarchy

  • PerformanceMonitor

Index

Constructors

  • constructor

    Parameters

    • Optional frameSampleSize: number

      The number of samples required to saturate the sliding window

    Returns PerformanceMonitor

Accessors

  • get averageFPS(): number
  • Returns the average framerate in frames per second over the sliding window (or the subset of frames sampled so far)

    Returns number

  • get averageFrameTime(): number
  • Returns the average frame time in milliseconds over the sliding window (or the subset of frames sampled so far)

    Returns number

  • get averageFrameTimeVariance(): number
  • Returns the variance frame time in milliseconds over the sliding window (or the subset of frames sampled so far)

    Returns number

  • get instantaneousFPS(): number
  • Returns the average framerate in frames per second using the most recent frame time

    Returns number

  • get instantaneousFrameTime(): number
  • Returns the frame time of the most recent frame

    Returns number

  • get isEnabled(): boolean
  • Returns true if sampling is enabled

    Returns boolean

  • get isSaturated(): boolean
  • Returns true if enough samples have been taken to completely fill the sliding window

    Returns boolean

Methods

  • disable(): void
  • Disables contributions to the sliding window sample set Samples will not be interpolated over the disabled period

    Returns void

  • enable(): void
  • Enables contributions to the sliding window sample set

    Returns void

  • reset(): void
  • Resets performance monitor

    Returns void

  • sampleFrame(timeMs?: number): void
  • Samples current frame

    Parameters

    • Optional timeMs: number

      A timestamp in milliseconds of the current frame to compare with other frames

    Returns void

Legend

  • Constructor
  • Property
  • Method
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Property
  • Method
  • Static method

Settings

Theme