Performance
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.
Instance Members
timeOrigin: FloatReturns the high resolution timestamp of the start time of the performance measurement.
timing: PerformanceTimingA 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.FunctionAn EventTarget which is a callback that will be called when the resourcetimingbufferfull event is fired.
now(): FloatReturns a DOMHighResTimeStamp representing the number of milliseconds elapsed since a reference instant.
| Returns |
|---|
| Float |
toJSON(): DynamicIs 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(): VoidRemoves all PerformanceEntry with a PerformanceEntry.entryType of "resource" from the browser's performance data buffer.
Sets the browser's resource timing buffer size to the specified number of "resource" PerformanceEntry.entryType PerformanceEntry objects.
| Name | Type |
|---|---|
maxSize |
Int |
Creates a DOMHighResTimeStamp in the browser's performance entry buffer with the given name.
| Name | Type |
|---|---|
markName |
String |
Removes the given mark from the browser's performance entry buffer.
| Name | Type | Default |
|---|---|---|
markName |
String | (optional) |
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) |
Removes the given measure from the browser's performance entry buffer.
| Name | Type | Default |
|---|---|---|
measureName |
String | (optional) |