pureweb.client.diagnostics. TimedEventProfiler

An implementation of Profiler that records the time taken to complete an event.

Method Summary

begin
Triggers the start of the event.
durationMs
Returns the total time it took to complete the event, in milliseconds.
end
Triggers the end of the event.
endAfter
Allows the end method to be called automatically after an event is complete.
profilerInfo
Returns an XML element containing the profiling data; this element is added to the overall profiler information for this client.

Constructor

new TimedEventProfiler()

Initializes a new instance of TimedEventProfiler.

Extends

Members

beginTime → number

The time when the event began.

endTime → number

The time when the event ended or -1 if the event is not complete.

Method Detail

begin()

Triggers the start of the event.

durationMs() → {number}

Returns the total time it took to complete the event, in milliseconds. Only valid after the event has begun and ended.

end()

Triggers the end of the event.

endAfter(func)

Allows the end method to be called automatically after an event is complete.
Parameters:
Name Type Description
func function The function to call before ending the event.

profilerInfo() → {Element}

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