class PerformanceMonitor
Performance monitor tracks rolling average frame-time and frame-time variance over a user defined sliding-window
constructor
Name | Type | Description | |
---|---|---|---|
optional | frameSampleSize | number | The number of samples required to saturate the sliding window |
Returns the average frame time in milliseconds over the sliding window (or the subset of frames sampled so far)
@return Average frame time in milliseconds
Returns the variance frame time in milliseconds over the sliding window (or the subset of frames sampled so far)
@return Frame time variance in milliseconds squared
Returns the frame time of the most recent frame
@return Frame time in milliseconds
Returns the average framerate in frames per second over the sliding window (or the subset of frames sampled so far)
@return Framerate in frames per second
Returns the average framerate in frames per second using the most recent frame time
@return Framerate in frames per second
Returns true if enough samples have been taken to completely fill the sliding window
@return true if saturated
Returns true if sampling is enabled
@return true if enabled
Samples current frame
Name | Type | Description | |
---|---|---|---|
optional | timeMs | number | A timestamp in milliseconds of the current frame to compare with other frames |
Enables contributions to the sliding window sample set
Disables contributions to the sliding window sample set
Samples will not be interpolated over the disabled period
Resets performance monitor