PerformanceTimeline

Experimental

Reporting of performance timeline events, as specified in https://w3c.github.io/performance-timeline/#dom-performanceobserver.

Dependencies: DOM, Network

Commands

PerformanceTimeline.enable

Previously buffered events would be reported before method returns.
See also: timelineEventAdded

Parameters
Name Type Description
eventTypes array<string> The types of event to report, as specified in
https://w3c.github.io/performance-timeline/#dom-performanceentry-entrytype
The specified filter overrides any previous filters, passing empty
filter disables recording.
Note that not all types exposed to the web platform are currently supported.

Events

PerformanceTimeline.timelineEventAdded

Sent when a performance timeline event is added. See reportPerformanceTimeline method.

Parameters
Name Type Description
event TimelineEvent

Types

LargestContentfulPaint

(object)

See https://github.com/WICG/LargestContentfulPaint and largest_contentful_paint.idl

Properties
Name Type Description
renderTime Network.TimeSinceEpoch
loadTime Network.TimeSinceEpoch
size number The number of pixels being painted.
elementId (optional) string The id attribute of the element, if available.
url (optional) string The URL of the image (may be trimmed).
nodeId (optional) DOM.BackendNodeId

LayoutShiftAttribution

(object)
Properties
Name Type Description
previousRect DOM.Rect
currentRect DOM.Rect
nodeId (optional) DOM.BackendNodeId

LayoutShift

(object)

See https://wicg.github.io/layout-instability/#sec-layout-shift and layout_shift.idl

Properties
Name Type Description
value number Score increment produced by this event.
hadRecentInput boolean
lastInputTime Network.TimeSinceEpoch
sources array<LayoutShiftAttribution>

TimelineEvent

(object)
Properties
Name Type Description
frameId Page.FrameId Identifies the frame that this event is related to. Empty for non-frame targets.
type string The event type, as specified in https://w3c.github.io/performance-timeline/#dom-performanceentry-entrytype
This determines which of the optional "details" fields is present.
name string Name may be empty depending on the type.
time Network.TimeSinceEpoch Time in seconds since Epoch, monotonically increasing within document lifetime.
duration (optional) number Event duration, if applicable.
lcpDetails (optional) LargestContentfulPaint
layoutShiftDetails (optional) LayoutShift

Summary