glendam/protocol/performance

This module is generated from the Chrome DevTools Protocol schema.

Do not edit this file manually. Generator: dev/codegen/generate_bindings.gleam Regenerate with:

gleam run -m codegen/generate_bindings

Protocol version: 1.3

Performance Domain

This protocol domain has no description.

📖 View this domain on the DevTools Protocol API Docs

Types

This type is not part of the protocol spec, it has been generated dynamically to represent the possible values of the enum property timeDomain of enable

pub type EnableTimeDomain {
  EnableTimeDomainTimeTicks
  EnableTimeDomainThreadTicks
}

Constructors

  • EnableTimeDomainTimeTicks

    Represents the timeTicks protocol value.

  • EnableTimeDomainThreadTicks

    Represents the threadTicks protocol value.

This type is not part of the protocol spec, it has been generated dynamically to represent the response to the command get_metrics

pub type GetMetricsResponse {
  GetMetricsResponse(metrics: List(Metric))
}

Constructors

  • GetMetricsResponse(metrics: List(Metric))

    Represents the GetMetricsResponse protocol value.

    Arguments

    metrics

    Current values for run-time metrics.

Run-time execution metric.

pub type Metric {
  Metric(name: String, value: Float)
}

Constructors

  • Metric(name: String, value: Float)

    Represents the Metric protocol value.

    Arguments

    name

    Metric name.

    value

    Metric value.

Values

pub fn disable(
  callback callback__: fn(String, option.Option(json.Json)) -> Result(
    dynamic.Dynamic,
    chrome.RequestError,
  ),
) -> Result(dynamic.Dynamic, chrome.RequestError)

Disable collecting and reporting metrics.

pub fn enable(
  callback callback__: fn(String, option.Option(json.Json)) -> Result(
    dynamic.Dynamic,
    chrome.RequestError,
  ),
  time_domain time_domain: option.Option(EnableTimeDomain),
) -> Result(dynamic.Dynamic, chrome.RequestError)

Enable collecting and reporting metrics.

Parameters:

  • time_domain : Time domain to use for collecting and reporting duration metrics.

Returns:

pub fn get_metrics(
  callback callback__: fn(String, option.Option(json.Json)) -> Result(
    dynamic.Dynamic,
    chrome.RequestError,
  ),
) -> Result(GetMetricsResponse, chrome.RequestError)

Retrieve current values of run-time metrics.

  • metrics : Current values for run-time metrics.
Search Document