Performance class

The 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. An object of this type can be obtained by calling the window.performance read-only attribute.

Note: This interface and its members are available in Web Workers via WorkerGlobalScope.performance , except where indicated below. Also, note that performance markers and measures are per context. If you create a mark on the main thread (or other worker), you cannot see it in a worker thread, and vice versa.

EventTarget

Performance

Implemented types
Available extensions
Annotations
  • @JS()
  • @staticInterop

Constructors

Performance()
factory

Properties

eventCounts EventCounts

Available on Performance, provided by the PropsPerformance extension

no setter
hashCode int
The hash code for this object.
no setterinherited
interactionCounts InteractionCounts

Available on Performance, provided by the PropsPerformance extension

no setter

Available on Performance, provided by the PropsPerformance extension

no setter
onresourcetimingbufferfull EventHandlerNonNull<Event>?

Available on Performance, provided by the PropsPerformance extension

getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timeOrigin double

Available on Performance, provided by the PropsPerformance extension

no setter
timing PerformanceTiming

Available on Performance, provided by the PropsPerformance extension

no setter

Methods

addEventListener(String type, EventListener? callback, [dynamic options]) → void

Available on EventTarget, provided by the PropsEventTarget extension

clearMarks([String? markName]) → void

Available on Performance, provided by the PropsPerformance extension

clearMeasures([String? measureName]) → void

Available on Performance, provided by the PropsPerformance extension

clearResourceTimings() → void

Available on Performance, provided by the PropsPerformance extension

dispatchEvent(Event event) bool

Available on EventTarget, provided by the PropsEventTarget extension

getEntries() Iterable<PerformanceEntry>

Available on Performance, provided by the PropsPerformance extension

getEntriesByName(String name, [String? type]) Iterable<PerformanceEntry>

Available on Performance, provided by the PropsPerformance extension

getEntriesByType(String type) Iterable<PerformanceEntry>

Available on Performance, provided by the PropsPerformance extension

mark(String markName, [PerformanceMarkOptions? markOptions]) PerformanceMark

Available on Performance, provided by the PropsPerformance extension

measure(String measureName, [dynamic startOrMeasureOptions, String? endMark]) PerformanceMeasure

Available on Performance, provided by the PropsPerformance extension

measureUserAgentSpecificMemory() Future<MemoryMeasurement>

Available on Performance, provided by the PropsPerformance extension

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
now() double

Available on Performance, provided by the PropsPerformance extension

removeEventListener(String type, EventListener? callback, [dynamic options]) → void

Available on EventTarget, provided by the PropsEventTarget extension

setResourceTimingBufferSize(int maxSize) → void

Available on Performance, provided by the PropsPerformance extension

toJSON() → dynamic

Available on Performance, provided by the PropsPerformance extension

toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited