Help us shape the future of Go! Take the 2026 Go Developer Survey

performance

package
v0.159.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: MIT Imports: 1 Imported by: 6

Documentation

Overview

Package performance provides the Chrome DevTools Protocol commands, types, and events for the Performance domain.

Generated by the pdlgen command.

Index

Constants

View Source
const (
	CommandDisable    = "Performance.disable"
	CommandEnable     = "Performance.enable"
	CommandGetMetrics = "Performance.getMetrics"
)

Command names.

Variables

View Source
var Disable = cdp.Command[cdp.Empty, cdp.Empty]{Method: CommandDisable}

Disable disable collecting and reporting metrics.

See: https://chromedevtools.github.io/devtools-protocol/tot/Performance#method-disable

Enable enable collecting and reporting metrics.

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

GetMetrics retrieve current values of run-time metrics.

See: https://chromedevtools.github.io/devtools-protocol/tot/Performance#method-getMetrics

View Source
var Metrics = cdp.Event[EventMetrics]{Method: "Performance.metrics"}

Metrics current values of the metrics.

See: https://chromedevtools.github.io/devtools-protocol/tot/Performance#event-metrics

Functions

This section is empty.

Types

type EnableParams

type EnableParams struct {
	TimeDomain EnableTimeDomain `json:"timeDomain,omitempty,omitzero"` // Time domain to use for collecting and reporting duration metrics.
}

EnableParams are the parameters of the command Performance.enable.

type EnableTimeDomain added in v0.157.1

type EnableTimeDomain string

EnableTimeDomain time domain to use for collecting and reporting duration metrics.

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

const (
	EnableTimeDomainTimeTicks   EnableTimeDomain = "timeTicks"
	EnableTimeDomainThreadTicks EnableTimeDomain = "threadTicks"
)

EnableTimeDomain values.

func (EnableTimeDomain) String added in v0.157.1

func (t EnableTimeDomain) String() string

String returns the EnableTimeDomain as string value.

type EventMetrics

type EventMetrics struct {
	Metrics []*Metric `json:"metrics"` // Current values of the metrics.
	Title   string    `json:"title"`   // Timestamp title.
}

EventMetrics current values of the metrics.

See: https://chromedevtools.github.io/devtools-protocol/tot/Performance#event-metrics

type GetMetricsResult added in v0.157.3

type GetMetricsResult struct {
	Metrics []*Metric `json:"metrics,omitempty,omitzero"` // Current values for run-time metrics.
}

GetMetricsResult is the result of the command Performance.getMetrics.

type Metric

type Metric struct {
	Name  string  `json:"name"`  // Metric name.
	Value float64 `json:"value"` // Metric value.
}

Metric run-time execution metric.

See: https://chromedevtools.github.io/devtools-protocol/tot/Performance#type-Metric

Jump to

Keyboard shortcuts

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