pureweb.client.diagnostics. RateProfiler

An implementation of Profiler that records the number of ticks in a given window.

Method Summary

appendAbsoluteValue
Sets an absolute value for this profiler.
appendRelativeChange
Updates the current value for this profiler.
dispose_
Tears down this rate profiler
profilerInfo
Returns an XML element containing the profiling data; this element is added to the overall profiler information for this client.

Constructor

new RateProfiler(windowMs)

Initializes a new instance of RateProfiler.
Parameters:
Name Type Argument Description
windowMs number <optional>
The interval window, in milliseconds; if not specified, defaults to 1000 ms.

Extends

Members

rate → number

The current rate in Hz.

Method Detail

appendAbsoluteValue(value)

Sets an absolute value for this profiler. The updated rate will reflect the difference in subsequent absolute values.
Parameters:
Name Type Description
value number The new absolute value.

appendRelativeChange(value)

Updates the current value for this profiler. The updated rate will reflect value and number of calls to the appendRelativeChange method.
Parameters:
Name Type Description
value number The relative change to record.

dispose_()

Tears down this rate profiler

profilerInfo() → {Element}

Returns an XML element containing the profiling data; this element is added to the overall profiler information for this client.