Documentation
¶
Overview ¶
Package performance provides the Chrome DevTools Protocol commands, types, and events for the Performance domain.
Generated by the cdproto-gen command.
Index ¶
Constants ¶
const ( CommandDisable = "Performance.disable" CommandEnable = "Performance.enable" CommandGetMetrics = "Performance.getMetrics" )
Command names.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DisableParams ¶
type DisableParams struct{}
DisableParams disable collecting and reporting metrics.
func Disable ¶
func Disable() *DisableParams
Disable disable collecting and reporting metrics.
See: https://chromedevtools.github.io/devtools-protocol/tot/Performance#method-disable
type EnableParams ¶
type EnableParams struct {
TimeDomain EnableTimeDomain `json:"timeDomain,omitempty"` // Time domain to use for collecting and reporting duration metrics.
}
EnableParams enable collecting and reporting metrics.
func Enable ¶
func Enable() *EnableParams
Enable enable collecting and reporting metrics.
See: https://chromedevtools.github.io/devtools-protocol/tot/Performance#method-enable
parameters:
func (*EnableParams) Do ¶
func (p *EnableParams) Do(ctx context.Context) (err error)
Do executes Performance.enable against the provided context.
func (EnableParams) WithTimeDomain ¶
func (p EnableParams) WithTimeDomain(timeDomain EnableTimeDomain) *EnableParams
WithTimeDomain time domain to use for collecting and reporting duration metrics.
type EnableTimeDomain ¶
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) MarshalJSON ¶
func (t EnableTimeDomain) MarshalJSON() ([]byte, error)
MarshalJSON satisfies json.Marshaler.
func (EnableTimeDomain) String ¶
func (t EnableTimeDomain) String() string
String returns the EnableTimeDomain as string value.
func (*EnableTimeDomain) UnmarshalJSON ¶
func (t *EnableTimeDomain) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies json.Unmarshaler.
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 GetMetricsParams ¶
type GetMetricsParams struct{}
GetMetricsParams retrieve current values of run-time metrics.
func GetMetrics ¶
func GetMetrics() *GetMetricsParams
GetMetrics retrieve current values of run-time metrics.
See: https://chromedevtools.github.io/devtools-protocol/tot/Performance#method-getMetrics
type GetMetricsReturns ¶
type GetMetricsReturns struct {
Metrics []*Metric `json:"metrics,omitempty"` // Current values for run-time metrics.
}
GetMetricsReturns return values.
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