PerformanceEventTiming

Baseline 2025
Newly available

Since December 2025, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

The PerformanceEventTiming interface of the Event Timing API provides insights into the latency of certain event types triggered by user interaction.

Description

This API enables visibility into slow events by providing event timestamps and duration for certain event types (see below). For example, you can monitor the time between a user action and the start of its event handler, or the time an event handler takes to run.

This API is particularly useful for measuring the Interaction to Next Paint (INP): the longest time (minus some outliers) from the point when a user interacts with your app to the point until the browser was actually able to respond to that interaction.

You typically work with PerformanceEventTiming objects by creating a PerformanceObserver instance and then calling its observe() method, passing in "event" or "first-input" as the value of the type option. The PerformanceObserver object's callback will then be called with a list of PerformanceEventTiming objects which you can analyze. See the example below for more.

By default, PerformanceEventTiming entries are exposed when their duration is 104ms or greater. Research suggests that user input that is not handled within 100ms is considered slow and 104ms is the first multiple of 8 greater than 100ms (for security reasons, this API is rounded to the nearest multiple of 8ms). However, you can set the PerformanceObserver to a different threshold using the durationThreshold option in the observe() method.

This interface inherits methods and properties from its parent, PerformanceEntry:

PerformanceEntry PerformanceEventTiming

Events exposed

The following event types are exposed by the Event Timing API:

Click events auxclick, click, contextmenu, dblclick
Composition events compositionend, compositionstart, compositionupdate
Drag & drop events dragend, dragenter, dragleave, dragover, dragstart, drop
Input events beforeinput, input
Keyboard events keydown, keypress, keyup
Mouse events mousedown, mouseenter, mouseleave, mouseout, mouseover, mouseup
Pointer events pointerover, pointerenter, pointerdown, pointerup, pointercancel, pointerout, pointerleave, gotpointercapture, lostpointercapture
Touch events touchstart, touchend, touchcancel

Note that the following events are not included in the list because they are continuous events and no meaningful event counts or performance metrics can be obtained at this point: mousemove, pointermove, pointerrawupdate, touchmove, wheel, drag.

To get a list of all exposed events, you can also look up keys in the performance.eventCounts map:

js
const exposedEventsList = [...performance.eventCounts.keys()];

Constructor

This interface has no constructor on its own. See the example below for how to typically get the information the PerformanceEventTiming interface holds.

Instance properties

This interface extends the following PerformanceEntry properties for event timing performance entry types by qualifying them as follows:

PerformanceEntry.duration Read only

Returns a DOMHighResTimeStamp representing the time from startTime to the next rendering paint (rounded to the nearest 8ms).

PerformanceEntry.entryType Read only

Returns "event" (for long events) or "first-input" (for the first user interaction).

PerformanceEntry.name Read only

Returns the associated event's type.

PerformanceEntry.startTime Read only

Returns a DOMHighResTimeStamp representing the associated event's timestamp property. This is the time the event was created and can be considered as a proxy for the time the user interaction occurred.

This interface also supports the following properties:

PerformanceEventTiming.cancelable Read only

Returns the associated event's cancelable property.

PerformanceEventTiming.interactionId Read only

Returns the ID that uniquely identifies the user interaction which triggered the associated event.

PerformanceEventTiming.processingStart Read only

Returns a DOMHighResTimeStamp representing the time at which event dispatch started. To measure the time between a user action and the time the event handler starts to run, calculate processingStart-startTime.

PerformanceEventTiming.processingEnd Read only

Returns a DOMHighResTimeStamp representing the time at which the event dispatch ended. To measure the time the event handler took to run, calculate processingEnd-processingStart.

PerformanceEventTiming.target Read only

Returns the associated event's last target, if it is not removed.

Instance methods

PerformanceEventTiming.toJSON()

Returns a JSON representation of the PerformanceEventTiming object.

Examples

Getting event timing information

To get event timing information, create a PerformanceObserver instance and then call its observe() method, passing in "event" or "first-input" as the value of the type option. You also need to set buffered to true to get access to events the user agent buffered while constructing the document. The PerformanceObserver object's callback will then be called with a list of PerformanceEventTiming objects which you can analyze.

js
const observer = new PerformanceObserver((list) => {
  list.getEntries().forEach((entry) => {
    // Full duration
    const duration = entry.duration;

    // Input delay (before processing event)
    const delay = entry.processingStart - entry.startTime;

    // Synchronous event processing time
    // (between start and end dispatch)
    const eventHandlerTime = entry.processingEnd - entry.processingStart;
    console.log(`Total duration: ${duration}`);
    console.log(`Event delay: ${delay}`);
    console.log(`Event handler duration: ${eventHandlerTime}`);
  });
});

// Register the observer for events
observer.observe({ type: "event", buffered: true });

You can also set a different durationThreshold. The default is 104ms and the minimum possible duration threshold is 16ms.

js
observer.observe({ type: "event", durationThreshold: 16, buffered: true });

Specifications

Specification
Event Timing API
# sec-performance-event-timing

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
PerformanceEventTiming
Chrome – Full support
Chrome 76 (Release date: 2019-07-30)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 89 (Release date: 2021-06-01)
footnote Full support
Opera – Full support
Opera 63 (Release date: 2019-08-20)
footnote Full support
Safari – Full support
Safari 26.2 (Release date: 2025-12-12)
footnote Full support
Chrome Android – Full support
Chrome Android 76 (Release date: 2019-07-30)
footnote Full support
Firefox for Android – Full support
Firefox for Android 89 (Release date: 2021-06-01)
footnote Full support
Opera Android – Full support
Opera Android 54 (Release date: 2019-10-18)
footnote Full support
Safari on iOS – Full support
Safari on iOS 26.2 (Release date: 2025-12-12)
footnote Full support
Samsung Internet – Full support
Samsung Internet 12 (Release date: 2020-06-19)
footnote Full support
WebView Android – Full support
WebView Android 76 (Release date: 2019-07-30)
footnote Full support
WebView on iOS – Full support
WebView on iOS 26.2 (Release date: 2025-12-12)
footnote Full support
cancelable
Chrome – Full support
Chrome 76 (Release date: 2019-07-30)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 89 (Release date: 2021-06-01)
footnote Full support
Opera – Full support
Opera 63 (Release date: 2019-08-20)
footnote Full support
Safari – Full support
Safari 26.2 (Release date: 2025-12-12)
footnote Full support
Chrome Android – Full support
Chrome Android 76 (Release date: 2019-07-30)
footnote Full support
Firefox for Android – Full support
Firefox for Android 89 (Release date: 2021-06-01)
footnote Full support
Opera Android – Full support
Opera Android 54 (Release date: 2019-10-18)
footnote Full support
Safari on iOS – Full support
Safari on iOS 26.2 (Release date: 2025-12-12)
footnote Full support
Samsung Internet – Full support
Samsung Internet 12 (Release date: 2020-06-19)
footnote Full support
WebView Android – Full support
WebView Android 76 (Release date: 2019-07-30)
footnote Full support
WebView on iOS – Full support
WebView on iOS 26.2 (Release date: 2025-12-12)
footnote Full support
interactionId
Chrome – Full support
Chrome 96 (Release date: 2021-11-15)
footnote Full support
Edge – Full support
Edge 96 (Release date: 2021-11-19)
footnote Full support
Firefox – Full support
Firefox 144 (Release date: 2025-10-14)
footnote Full support
Opera – Full support
Opera 82 (Release date: 2021-12-02)
footnote Full support
Safari – Full support
Safari 26.2 (Release date: 2025-12-12)
footnote Full support
Chrome Android – Full support
Chrome Android 96 (Release date: 2021-11-15)
footnote Full support
Firefox for Android – Full support
Firefox for Android 144 (Release date: 2025-10-14)
footnote Full support
Opera Android – Full support
Opera Android 67 (Release date: 2022-01-31)
footnote Full support
Safari on iOS – Full support
Safari on iOS 26.2 (Release date: 2025-12-12)
footnote Full support
Samsung Internet – Full support
Samsung Internet 17 (Release date: 2022-05-04)
footnote Full support
WebView Android – Full support
WebView Android 96 (Release date: 2021-11-15)
footnote Full support
WebView on iOS – Full support
WebView on iOS 26.2 (Release date: 2025-12-12)
footnote Full support
processingEnd
Chrome – Full support
Chrome 76 (Release date: 2019-07-30)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 89 (Release date: 2021-06-01)
footnote Full support
Opera – Full support
Opera 63 (Release date: 2019-08-20)
footnote Full support
Safari – Full support
Safari 26.2 (Release date: 2025-12-12)
footnote Full support
Chrome Android – Full support
Chrome Android 76 (Release date: 2019-07-30)
footnote Full support
Firefox for Android – Full support
Firefox for Android 89 (Release date: 2021-06-01)
footnote Full support
Opera Android – Full support
Opera Android 54 (Release date: 2019-10-18)
footnote Full support
Safari on iOS – Full support
Safari on iOS 26.2 (Release date: 2025-12-12)
footnote Full support
Samsung Internet – Full support
Samsung Internet 12 (Release date: 2020-06-19)
footnote Full support
WebView Android – Full support
WebView Android 76 (Release date: 2019-07-30)
footnote Full support
WebView on iOS – Full support
WebView on iOS 26.2 (Release date: 2025-12-12)
footnote Full support
processingStart
Chrome – Full support
Chrome 76 (Release date: 2019-07-30)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 89 (Release date: 2021-06-01)
footnote Full support
Opera – Full support
Opera 63 (Release date: 2019-08-20)
footnote Full support
Safari – Full support
Safari 26.2 (Release date: 2025-12-12)
footnote Full support
Chrome Android – Full support
Chrome Android 76 (Release date: 2019-07-30)
footnote Full support
Firefox for Android – Full support
Firefox for Android 89 (Release date: 2021-06-01)
footnote Full support
Opera Android – Full support
Opera Android 54 (Release date: 2019-10-18)
footnote Full support
Safari on iOS – Full support
Safari on iOS 26.2 (Release date: 2025-12-12)
footnote Full support
Samsung Internet – Full support
Samsung Internet 12 (Release date: 2020-06-19)
footnote Full support
WebView Android – Full support
WebView Android 76 (Release date: 2019-07-30)
footnote Full support
WebView on iOS – Full support
WebView on iOS 26.2 (Release date: 2025-12-12)
footnote Full support
target
Chrome – Full support
Chrome 85 (Release date: 2020-08-25)
footnote Full support
Edge – Full support
Edge 85 (Release date: 2020-08-27)
footnote Full support
Firefox – Full support
Firefox 89 (Release date: 2021-06-01)
footnote Full support
Opera – Full support
Opera 71 (Release date: 2020-09-15)
footnote Full support
Safari – Full support
Safari 26.2 (Release date: 2025-12-12)
footnote Full support
Chrome Android – Full support
Chrome Android 85 (Release date: 2020-08-25)
footnote Full support
Firefox for Android – Full support
Firefox for Android 89 (Release date: 2021-06-01)
footnote Full support
Opera Android – Full support
Opera Android 60 (Release date: 2020-09-23)
footnote Full support
Safari on iOS – Full support
Safari on iOS 26.2 (Release date: 2025-12-12)
footnote Full support
Samsung Internet – Full support
Samsung Internet 14 (Release date: 2021-04-17)
footnote Full support
WebView Android – Full support
WebView Android 85 (Release date: 2020-08-25)
footnote Full support
WebView on iOS – Full support
WebView on iOS 26.2 (Release date: 2025-12-12)
footnote Full support
toJSON
Chrome – Full support
Chrome 76 (Release date: 2019-07-30)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 89 (Release date: 2021-06-01)
footnote Full support
Opera – Full support
Opera 63 (Release date: 2019-08-20)
footnote Full support
Safari – Full support
Safari 26.2 (Release date: 2025-12-12)
footnote Full support
Chrome Android – Full support
Chrome Android 76 (Release date: 2019-07-30)
footnote Full support
Firefox for Android – Full support
Firefox for Android 89 (Release date: 2021-06-01)
footnote Full support
Opera Android – Full support
Opera Android 54 (Release date: 2019-10-18)
footnote Full support
Safari on iOS – Full support
Safari on iOS 26.2 (Release date: 2025-12-12)
footnote Full support
Samsung Internet – Full support
Samsung Internet 12 (Release date: 2020-06-19)
footnote Full support
WebView Android – Full support
WebView Android 76 (Release date: 2019-07-30)
footnote Full support
WebView on iOS – Full support
WebView on iOS 26.2 (Release date: 2025-12-12)
footnote Full support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support

See also