// Package performance provides the Chrome DevTools Protocol// commands, types, and events for the Performance domain.//// Generated by the cdproto-gen command.
package performance// Code generated by cdproto-gen. DO NOT EDIT.import ()// DisableParams disable collecting and reporting metrics.typeDisableParamsstruct{}// Disable disable collecting and reporting metrics.//// See: https://chromedevtools.github.io/devtools-protocol/tot/Performance#method-disablefunc () *DisableParams {return &DisableParams{}}// Do executes Performance.disable against the provided context.func ( *DisableParams) ( context.Context) ( error) {returncdp.Execute(, CommandDisable, nil, nil)}// EnableParams enable collecting and reporting metrics.typeEnableParamsstruct { TimeDomain EnableTimeDomain`json:"timeDomain,omitempty"`// Time domain to use for collecting and reporting duration metrics.}// Enable enable collecting and reporting metrics.//// See: https://chromedevtools.github.io/devtools-protocol/tot/Performance#method-enable//// parameters:func () *EnableParams {return &EnableParams{}}// WithTimeDomain time domain to use for collecting and reporting duration// metrics.func ( EnableParams) ( EnableTimeDomain) *EnableParams { .TimeDomain = return &}// Do executes Performance.enable against the provided context.func ( *EnableParams) ( context.Context) ( error) {returncdp.Execute(, CommandEnable, , nil)}// GetMetricsParams retrieve current values of run-time metrics.typeGetMetricsParamsstruct{}// GetMetrics retrieve current values of run-time metrics.//// See: https://chromedevtools.github.io/devtools-protocol/tot/Performance#method-getMetricsfunc () *GetMetricsParams {return &GetMetricsParams{}}// GetMetricsReturns return values.typeGetMetricsReturnsstruct { Metrics []*Metric`json:"metrics,omitempty"`// Current values for run-time metrics.}// Do executes Performance.getMetrics against the provided context.//// returns://// metrics - Current values for run-time metrics.func ( *GetMetricsParams) ( context.Context) ( []*Metric, error) {// executevarGetMetricsReturns = cdp.Execute(, CommandGetMetrics, nil, &)if != nil {returnnil, }return .Metrics, nil}// Command names.const (CommandDisable = "Performance.disable"CommandEnable = "Performance.enable"CommandGetMetrics = "Performance.getMetrics")
The pages are generated with Goldsv0.8.2. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds.