W3cubDocs

/Haxe JavaScript

Performance

package js.html

extends EventTarget

Available on js

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 also:

Variables

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:Function

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

read onlytimeOrigin:Float

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

read onlytiming:PerformanceTiming

A PerformanceTiming object containing latency-related performance information

Methods

clearMarks(?markName:String):Void

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

clearMeasures(?measureName:String):Void

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

clearResourceTimings():Void

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

getEntries():Array<PerformanceEntry>

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

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

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

getEntriesByType(entryType:String):Array<PerformanceEntry>

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

mark(markName:String):Void

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

Throws:

null

DOMError

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).

Throws:

null

DOMError

now():Float

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

setResourceTimingBufferSize(maxSize:Int):Void

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

toJSON():Dynamic

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

© 2005–2020 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/html/Performance.html