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
- type DisableParams
- type EnableParams
- type EventMetrics
- type GetMetricsParams
- func (p *GetMetricsParams) Do(ctx context.Context) (metrics []*Metric, err error)
- func (v GetMetricsParams) MarshalEasyJSON(w *jwriter.Writer)
- func (v GetMetricsParams) MarshalJSON() ([]byte, error)
- func (v *GetMetricsParams) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *GetMetricsParams) UnmarshalJSON(data []byte) error
- type GetMetricsReturns
- type Metric
- type SetTimeDomainParams
- func (p *SetTimeDomainParams) Do(ctx context.Context) (err error)
- func (v SetTimeDomainParams) MarshalEasyJSON(w *jwriter.Writer)
- func (v SetTimeDomainParams) MarshalJSON() ([]byte, error)
- func (v *SetTimeDomainParams) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *SetTimeDomainParams) UnmarshalJSON(data []byte) error
- type SetTimeDomainTimeDomain
- func (t SetTimeDomainTimeDomain) MarshalEasyJSON(out *jwriter.Writer)
- func (t SetTimeDomainTimeDomain) MarshalJSON() ([]byte, error)
- func (t SetTimeDomainTimeDomain) String() string
- func (t *SetTimeDomainTimeDomain) UnmarshalEasyJSON(in *jlexer.Lexer)
- func (t *SetTimeDomainTimeDomain) UnmarshalJSON(buf []byte) error
Constants ¶
const ( CommandDisable = "Performance.disable" CommandEnable = "Performance.enable" CommandSetTimeDomain = "Performance.setTimeDomain" 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
func (*DisableParams) Do ¶
func (p *DisableParams) Do(ctx context.Context) (err error)
Do executes Performance.disable against the provided context.
func (DisableParams) MarshalEasyJSON ¶
func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (DisableParams) MarshalJSON ¶
func (v DisableParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*DisableParams) UnmarshalEasyJSON ¶
func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*DisableParams) UnmarshalJSON ¶
func (v *DisableParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type EnableParams ¶
type EnableParams struct{}
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
func (*EnableParams) Do ¶
func (p *EnableParams) Do(ctx context.Context) (err error)
Do executes Performance.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 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
func (EventMetrics) MarshalEasyJSON ¶
func (v EventMetrics) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (EventMetrics) MarshalJSON ¶
func (v EventMetrics) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*EventMetrics) UnmarshalEasyJSON ¶
func (v *EventMetrics) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*EventMetrics) UnmarshalJSON ¶
func (v *EventMetrics) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
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
func (*GetMetricsParams) Do ¶
func (p *GetMetricsParams) Do(ctx context.Context) (metrics []*Metric, err error)
Do executes Performance.getMetrics against the provided context.
returns:
metrics - Current values for run-time metrics.
func (GetMetricsParams) MarshalEasyJSON ¶
func (v GetMetricsParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (GetMetricsParams) MarshalJSON ¶
func (v GetMetricsParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*GetMetricsParams) UnmarshalEasyJSON ¶
func (v *GetMetricsParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*GetMetricsParams) UnmarshalJSON ¶
func (v *GetMetricsParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type GetMetricsReturns ¶
type GetMetricsReturns struct {
Metrics []*Metric `json:"metrics,omitempty"` // Current values for run-time metrics.
}
GetMetricsReturns return values.
func (GetMetricsReturns) MarshalEasyJSON ¶
func (v GetMetricsReturns) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (GetMetricsReturns) MarshalJSON ¶
func (v GetMetricsReturns) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*GetMetricsReturns) UnmarshalEasyJSON ¶
func (v *GetMetricsReturns) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*GetMetricsReturns) UnmarshalJSON ¶
func (v *GetMetricsReturns) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
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
func (Metric) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Metric) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Metric) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Metric) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type SetTimeDomainParams ¶
type SetTimeDomainParams struct {
TimeDomain SetTimeDomainTimeDomain `json:"timeDomain"` // Time domain
}
SetTimeDomainParams sets time domain to use for collecting and reporting duration metrics. Note that this must be called before enabling metrics collection. Calling this method while metrics collection is enabled returns an error.
func SetTimeDomain ¶
func SetTimeDomain(timeDomain SetTimeDomainTimeDomain) *SetTimeDomainParams
SetTimeDomain sets time domain to use for collecting and reporting duration metrics. Note that this must be called before enabling metrics collection. Calling this method while metrics collection is enabled returns an error.
See: https://chromedevtools.github.io/devtools-protocol/tot/Performance#method-setTimeDomain
parameters:
timeDomain - Time domain
func (*SetTimeDomainParams) Do ¶
func (p *SetTimeDomainParams) Do(ctx context.Context) (err error)
Do executes Performance.setTimeDomain against the provided context.
func (SetTimeDomainParams) MarshalEasyJSON ¶
func (v SetTimeDomainParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (SetTimeDomainParams) MarshalJSON ¶
func (v SetTimeDomainParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*SetTimeDomainParams) UnmarshalEasyJSON ¶
func (v *SetTimeDomainParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*SetTimeDomainParams) UnmarshalJSON ¶
func (v *SetTimeDomainParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type SetTimeDomainTimeDomain ¶
type SetTimeDomainTimeDomain string
SetTimeDomainTimeDomain time domain.
See: https://chromedevtools.github.io/devtools-protocol/tot/Performance#type-timeDomain
const ( SetTimeDomainTimeDomainTimeTicks SetTimeDomainTimeDomain = "timeTicks" SetTimeDomainTimeDomainThreadTicks SetTimeDomainTimeDomain = "threadTicks" )
SetTimeDomainTimeDomain values.
func (SetTimeDomainTimeDomain) MarshalEasyJSON ¶
func (t SetTimeDomainTimeDomain) MarshalEasyJSON(out *jwriter.Writer)
MarshalEasyJSON satisfies easyjson.Marshaler.
func (SetTimeDomainTimeDomain) MarshalJSON ¶
func (t SetTimeDomainTimeDomain) MarshalJSON() ([]byte, error)
MarshalJSON satisfies json.Marshaler.
func (SetTimeDomainTimeDomain) String ¶
func (t SetTimeDomainTimeDomain) String() string
String returns the SetTimeDomainTimeDomain as string value.
func (*SetTimeDomainTimeDomain) UnmarshalEasyJSON ¶
func (t *SetTimeDomainTimeDomain) UnmarshalEasyJSON(in *jlexer.Lexer)
UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (*SetTimeDomainTimeDomain) UnmarshalJSON ¶
func (t *SetTimeDomainTimeDomain) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies json.Unmarshaler.