PerformanceMeasure

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2017.

Note: This feature is available in Web Workers.

PerformanceMeasure is an abstract interface for PerformanceEntry objects with an entryType of "measure". Entries of this type are created by calling performance.measure() to add a named DOMHighResTimeStamp (the measure) between two marks to the browser's performance timeline.

PerformanceEntry PerformanceMeasure

Instance properties

PerformanceMeasure.detail

Contains arbitrary metadata about the measure.

This interface extends the following PerformanceEntry properties by qualifying/constraining the properties as follows:

PerformanceEntry.entryType

Returns "measure".

PerformanceEntry.name

Returns the name given to the measure when it was created via a call to performance.measure().

PerformanceEntry.startTime

Returns a timestamp given to the measure when performance.measure() was called.

PerformanceEntry.duration

Returns a DOMHighResTimeStamp that is the duration of the measure (typically, the measure's end mark timestamp minus its start mark timestamp).

Instance methods

This interface has no methods.

Example

See the example in Using the User Timing API.

Chrome DevTools uses performance.measure() and in particular a structured detail property as part of its extensibility API that surfaces these in custom tracks in performance traces. See the example in Performance: measure() method page and the Chrome's extensibility API documentation for more information and examples.

Specifications

Specification
User Timing
# performancemeasure

Browser compatibility

desktop mobile server
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
Bun
Deno
Node.js
PerformanceMeasure
Chrome – Full support
Chrome 25 (Release date: 2013-02-21)
footnote Full support
Edge – Full support
Edge 12 (Release date: 2015-07-29)
footnote Full support
Firefox – Full support
Firefox 38 (Release date: 2015-05-12)
footnote Full support
Opera – Full support
Opera 33 (Release date: 2015-10-27)
footnote Full support
Safari – Full support
Safari 11 (Release date: 2017-09-19)
footnote Full support
Chrome Android – Full support
Chrome Android 25 (Release date: 2013-02-27)
footnote Full support
Firefox for Android – Full support
Firefox for Android 38 (Release date: 2015-05-12)
footnote Full support
Opera Android – Full support
Opera Android 33 (Release date: 2015-11-03)
footnote Full support
Safari on iOS – Full support
Safari on iOS 11 (Release date: 2017-09-19)
footnote Full support
Samsung Internet – Full support
Samsung Internet 1.5 (Release date: 2013-09-25)
footnote Full support
WebView Android – Full support
WebView Android 4.4 (Release date: 2013-12-09)
footnote Full support
WebView on iOS – Full support
WebView on iOS 11 (Release date: 2017-09-19)
footnote Full support
Bun – Full support
Bun 1.0.22 (Release date: 2024-01-10)
footnote Full support
Deno – Full support
Deno 1.2 (Release date: 2020-07-13)
footnote Full support
Node.js – Partial support
Node.js 16 – 16.6 (Release date: 2021-04-20)
footnote Partial support
footnote Only available as an internal instance, but can be accessed via getting performance entries.
Node.js – Partial support
Node.js 16.7 – 18.20 (Release date: 2021-08-17)
footnote Partial support
footnote Available as a part of the perf_hooks module.
Node.js – Full support
Node.js 19 (Release date: 2022-10-18)
footnote Full support
detail
Chrome – Full support
Chrome 78 (Release date: 2019-10-22)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 103 (Release date: 2022-07-26)
footnote Full support
Opera – Full support
Opera 65 (Release date: 2019-11-13)
footnote Full support
Safari – Full support
Safari 14.1 (Release date: 2021-04-26)
footnote Full support
Chrome Android – Full support
Chrome Android 78 (Release date: 2019-10-22)
footnote Full support
Firefox for Android – Full support
Firefox for Android 103 (Release date: 2022-07-26)
footnote Full support
Opera Android – Full support
Opera Android 56 (Release date: 2020-02-06)
footnote Full support
Safari on iOS – Full support
Safari on iOS 14.5 (Release date: 2021-04-26)
footnote Full support
Samsung Internet – Full support
Samsung Internet 12 (Release date: 2020-06-19)
footnote Full support
WebView Android – Full support
WebView Android 78 (Release date: 2019-10-22)
footnote Full support
WebView on iOS – Full support
WebView on iOS 14.5 (Release date: 2021-04-26)
footnote Full support
Bun – Full support
Bun 1.0.22 (Release date: 2024-01-10)
footnote Full support
Deno – Full support
Deno 1.2 (Release date: 2020-07-13)
footnote Full support
Node.js – Full support
Node.js 16 (Release date: 2021-04-20)
footnote Full support

Legend

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

Full support
Full support
Partial support
Partial support
Has more compatibility info.

See also