Performance

EventTargetjs.html.Performance (extern class)

The Performance interface provides access to performance-related information for the current page. It's part of the High Resolution Time API, but is enhanced by the Performance Timeline API, the Navigation Timing API, the User Timing API, and the Resource Timing API.

Documentation Performance by Mozilla Contributors, licensed under CC-BY-SA 2.5.

See:

Instance Members

timeOrigin: Float

Returns the high resolution timestamp of the start time of the performance measurement.


A PerformanceTiming object containing latency-related performance information


A PerformanceNavigation object that provides useful context about the operations included in the times listed in timing, including whether the page was a load or a refresh, how many redirections occurred, and so forth.


onresourcetimingbufferfull: haxe.Function

An EventTarget which is a callback that will be called when the resourcetimingbufferfull event is fired.


now(): Float

Returns a DOMHighResTimeStamp representing the number of milliseconds elapsed since a reference instant.

Returns
Float

toJSON(): Dynamic

Is a jsonizer returning a json object representing the Performance object.

Returns
Dynamic

getEntries(): Array<PerformanceEntry>

Returns a list of PerformanceEntry objects based on the given filter.

Returns
Array<PerformanceEntry>

getEntriesByType(entryType: String): Array<PerformanceEntry>

Returns a list of PerformanceEntry objects of the given entry type.

Name Type
entryType String
Returns
Array<PerformanceEntry>

getEntriesByName(name: String, ?entryType: String): Array<PerformanceEntry>

Returns a list of PerformanceEntry objects based on the given name and entry type.

Name Type Default
name String
entryType String (optional)
Returns
Array<PerformanceEntry>

clearResourceTimings(): Void

Removes all PerformanceEntry with a PerformanceEntry.entryType of "resource" from the browser's performance data buffer.


setResourceTimingBufferSize(maxSize: Int): Void

Sets the browser's resource timing buffer size to the specified number of "resource" PerformanceEntry.entryType PerformanceEntry objects.

Name Type
maxSize Int

mark(markName: String): Void

Creates a DOMHighResTimeStamp in the browser's performance entry buffer with the given name.

Name Type
markName String

clearMarks(?markName: String): Void

Removes the given mark from the browser's performance entry buffer.

Name Type Default
markName String (optional)

measure(measureName: String, ?startMark: String, ?endMark: String): Void

Creates a named DOMHighResTimeStamp in the browser's performance entry buffer between two specified marks (known as the start mark and end mark, respectively).

Name Type Default
measureName String
startMark String (optional)
endMark String (optional)

clearMeasures(?measureName: String): Void

Removes the given measure from the browser's performance entry buffer.

Name Type Default
measureName String (optional)