// 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. type DisableParams struct{} // Disable disable collecting and reporting metrics. // // See: https://chromedevtools.github.io/devtools-protocol/tot/Performance#method-disable func () *DisableParams { return &DisableParams{} } // Do executes Performance.disable against the provided context. func ( *DisableParams) ( context.Context) ( error) { return cdp.Execute(, CommandDisable, nil, nil) } // EnableParams enable collecting and reporting metrics. type EnableParams struct { 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) { return cdp.Execute(, CommandEnable, , nil) } // GetMetricsParams retrieve current values of run-time metrics. type GetMetricsParams struct{} // GetMetrics retrieve current values of run-time metrics. // // See: https://chromedevtools.github.io/devtools-protocol/tot/Performance#method-getMetrics func () *GetMetricsParams { return &GetMetricsParams{} } // GetMetricsReturns return values. type GetMetricsReturns struct { 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) { // execute var GetMetricsReturns = cdp.Execute(, CommandGetMetrics, nil, &) if != nil { return nil, } return .Metrics, nil } // Command names. const ( CommandDisable = "Performance.disable" CommandEnable = "Performance.enable" CommandGetMetrics = "Performance.getMetrics" )