performancetimeline

package
v0.32.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package performancetimeline implements the PerformanceTimeline domain. Reporting of performance timeline events, as specified in https://w3c.github.io/performance-timeline/#dom-performanceobserver.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(conn *rpcc.Conn) *domainClient

NewClient returns a client for the PerformanceTimeline domain with the connection set to conn.

Types

type EnableArgs

type EnableArgs 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.
}

EnableArgs represents the arguments for Enable in the PerformanceTimeline domain.

func NewEnableArgs

func NewEnableArgs(eventTypes []string) *EnableArgs

NewEnableArgs initializes EnableArgs with the required arguments.

type LargestContentfulPaint

type LargestContentfulPaint struct {
	RenderTime network.TimeSinceEpoch `json:"renderTime"`          // No description.
	LoadTime   network.TimeSinceEpoch `json:"loadTime"`            // No description.
	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     *dom.BackendNodeID     `json:"nodeId,omitempty"`    // No description.
}

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

type LayoutShift

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

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

type LayoutShiftAttribution

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

LayoutShiftAttribution

type TimelineEvent

type TimelineEvent struct {
	FrameID            page.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" fiedls is present.
	Name               string                  `json:"name"`                         // Name may be empty depending on the type.
	Time               network.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"`         // No description.
	LayoutShiftDetails *LayoutShift            `json:"layoutShiftDetails,omitempty"` // No description.
}

TimelineEvent

type TimelineEventAddedClient

type TimelineEventAddedClient interface {
	// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
	// triggered, context canceled or connection closed.
	Recv() (*TimelineEventAddedReply, error)
	rpcc.Stream
}

TimelineEventAddedClient is a client for TimelineEventAdded events. Sent when a performance timeline event is added. See reportPerformanceTimeline method.

type TimelineEventAddedReply

type TimelineEventAddedReply struct {
	Event TimelineEvent `json:"event"` // No description.
}

TimelineEventAddedReply is the reply for TimelineEventAdded events.

Jump to

Keyboard shortcuts

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