PerformanceObserverEntryList

The PerformanceObserverEntryList interface is a list of performance events that were explicitly observed via the observe() method.

Note: this interface is exposed to Window and Worker.

Methods

PerformanceObserverEntryList.getEntries()

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

PerformanceObserverEntryList.getEntriesByType()

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

PerformanceObserverEntryList.getEntriesByName()

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

Example

// Create observer for all performance event types
// list is of type PerformanceObserveEntryList
const observe_all = new PerformanceObserver((list, obs) => {
  const perfEntries = list.getEntries();
  perfEntries.forEach((entry) => print_perf_entry(entry));
})

Specifications

Specification
Performance Timeline
# performanceobserverentrylist-interface

Browser compatibility

BCD tables only load in the browser