Performance
The Performance
interface provides access to performance-related information for the current page.
Properties
The read-only performance.eventCounts
property is an EventCounts map containing the number of events which have been dispatched per event type.
The timeOrigin
read-only property of the Performance interface returns the high resolution timestamp that is used as the baseline for performance-related timestamps.
Functions
The clearMarks()
method removes all or specific PerformanceMark objects from the browser's performance timeline.
The clearMeasures()
method removes all or specific PerformanceMeasure objects from the browser's performance timeline.
The clearResourceTimings()
method removes all performance entries with an PerformanceEntry.entryType of 'resource'
from the browser's performance timeline and sets the size of the performance resource data buffer to zero.
The getEntries()
method returns an array of all PerformanceEntry objects currently present in the performance timeline.
The getEntriesByName()
method returns an array of PerformanceEntry objects currently present in the performance timeline with the given name and type.
The getEntriesByType()
method returns an array of PerformanceEntry objects currently present in the performance timeline for a given type.
The mark()
method creates a named PerformanceMark object representing a high resolution timestamp marker in the browser's performance timeline.
The measure()
method creates a named PerformanceMeasure object representing a time measurement between two marks in the browser's performance timeline.
The performance.now()
method returns a high resolution timestamp in milliseconds.
The setResourceTimingBufferSize()
method sets the desired size of the browser's resource timing buffer which stores the 'resource'
performance entries.