performancetimeline

package
v0.0.0-...-a72e670 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package performancetimeline provides the Chrome DevTools Protocol commands, types, and events for the PerformanceTimeline domain.

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

Generated by the cdproto-gen command.

Index

Constants

View Source
const (
	CommandEnable = "PerformanceTimeline.enable"
)

Command names.

Variables

This section is empty.

Functions

This section is empty.

Types

type EnableParams

type EnableParams struct {
	EventTypes []string `json:"eventTypes"` // 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.
}

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

func Enable

func Enable(eventTypes []string) *EnableParams

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

See: https://chromedevtools.github.io/devtools-protocol/tot/PerformanceTimeline#method-enable

parameters:

eventTypes - 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.

func (*EnableParams) Do

func (p *EnableParams) Do(ctx context.Context) (err error)

Do executes PerformanceTimeline.enable against the provided context.

func (EnableParams) MarshalEasyJSON

func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (EnableParams) MarshalJSON

func (v EnableParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*EnableParams) UnmarshalEasyJSON

func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EnableParams) UnmarshalJSON

func (v *EnableParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type EventTimelineEventAdded

type EventTimelineEventAdded struct {
	Event *TimelineEvent `json:"event"`
}

EventTimelineEventAdded sent when a performance timeline event is added. See reportPerformanceTimeline method.

See: https://chromedevtools.github.io/devtools-protocol/tot/PerformanceTimeline#event-timelineEventAdded

func (EventTimelineEventAdded) MarshalEasyJSON

func (v EventTimelineEventAdded) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (EventTimelineEventAdded) MarshalJSON

func (v EventTimelineEventAdded) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*EventTimelineEventAdded) UnmarshalEasyJSON

func (v *EventTimelineEventAdded) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EventTimelineEventAdded) UnmarshalJSON

func (v *EventTimelineEventAdded) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type LargestContentfulPaint

type LargestContentfulPaint struct {
	RenderTime *cdp.TimeSinceEpoch `json:"renderTime"`
	LoadTime   *cdp.TimeSinceEpoch `json:"loadTime"`
	Size       float64             `json:"size"`                // The number of pixels being painted.
	ElementID  string              `json:"elementId,omitempty"` // The id attribute of the element, if available.
	URL        string              `json:"url,omitempty"`       // The URL of the image (may be trimmed).
	NodeID     cdp.BackendNodeID   `json:"nodeId,omitempty"`
}

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

See: https://chromedevtools.github.io/devtools-protocol/tot/PerformanceTimeline#type-LargestContentfulPaint

func (LargestContentfulPaint) MarshalEasyJSON

func (v LargestContentfulPaint) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (LargestContentfulPaint) MarshalJSON

func (v LargestContentfulPaint) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*LargestContentfulPaint) UnmarshalEasyJSON

func (v *LargestContentfulPaint) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*LargestContentfulPaint) UnmarshalJSON

func (v *LargestContentfulPaint) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type LayoutShift

type LayoutShift struct {
	Value          float64                   `json:"value"` // Score increment produced by this event.
	HadRecentInput bool                      `json:"hadRecentInput"`
	LastInputTime  *cdp.TimeSinceEpoch       `json:"lastInputTime"`
	Sources        []*LayoutShiftAttribution `json:"sources"`
}

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

See: https://chromedevtools.github.io/devtools-protocol/tot/PerformanceTimeline#type-LayoutShift

func (LayoutShift) MarshalEasyJSON

func (v LayoutShift) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (LayoutShift) MarshalJSON

func (v LayoutShift) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*LayoutShift) UnmarshalEasyJSON

func (v *LayoutShift) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*LayoutShift) UnmarshalJSON

func (v *LayoutShift) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type LayoutShiftAttribution

type LayoutShiftAttribution struct {
	PreviousRect *dom.Rect         `json:"previousRect"`
	CurrentRect  *dom.Rect         `json:"currentRect"`
	NodeID       cdp.BackendNodeID `json:"nodeId,omitempty"`
}

LayoutShiftAttribution [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/PerformanceTimeline#type-LayoutShiftAttribution

func (LayoutShiftAttribution) MarshalEasyJSON

func (v LayoutShiftAttribution) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (LayoutShiftAttribution) MarshalJSON

func (v LayoutShiftAttribution) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*LayoutShiftAttribution) UnmarshalEasyJSON

func (v *LayoutShiftAttribution) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*LayoutShiftAttribution) UnmarshalJSON

func (v *LayoutShiftAttribution) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type TimelineEvent

type TimelineEvent struct {
	FrameID            cdp.FrameID             `json:"frameId"`            // Identifies the frame that this event is related to. Empty for non-frame targets.
	Type               string                  `json:"type"`               // 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                  `json:"name"`               // Name may be empty depending on the type.
	Time               *cdp.TimeSinceEpoch     `json:"time"`               // Time in seconds since Epoch, monotonically increasing within document lifetime.
	Duration           float64                 `json:"duration,omitempty"` // Event duration, if applicable.
	LcpDetails         *LargestContentfulPaint `json:"lcpDetails,omitempty"`
	LayoutShiftDetails *LayoutShift            `json:"layoutShiftDetails,omitempty"`
}

TimelineEvent [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/PerformanceTimeline#type-TimelineEvent

func (TimelineEvent) MarshalEasyJSON

func (v TimelineEvent) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (TimelineEvent) MarshalJSON

func (v TimelineEvent) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*TimelineEvent) UnmarshalEasyJSON

func (v *TimelineEvent) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*TimelineEvent) UnmarshalJSON

func (v *TimelineEvent) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL