performance
Metric
dataclass
Run-time execution metric.
Source code in zendriver/cdp/performance.py
name: str
instance-attribute
value: float
instance-attribute
__init__(name, value)
from_json(json)
classmethod
Metrics
dataclass
Current values of the metrics.
Source code in zendriver/cdp/performance.py
metrics: typing.List[Metric]
instance-attribute
title: str
instance-attribute
__init__(metrics, title)
disable()
Disable collecting and reporting metrics.
enable(time_domain=None)
Enable collecting and reporting metrics.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
time_domain
|
Optional[str]
|
(Optional) Time domain to use for collecting and reporting duration metrics. |
None
|
Source code in zendriver/cdp/performance.py
get_metrics()
Retrieve current values of run-time metrics.
Returns:
Type | Description |
---|---|
Generator[T_JSON_DICT, T_JSON_DICT, List[Metric]]
|
Current values for run-time metrics. |
Source code in zendriver/cdp/performance.py
set_time_domain(time_domain)
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.
.. deprecated:: 1.3
EXPERIMENTAL
Parameters:
Name | Type | Description | Default |
---|---|---|---|
time_domain
|
str
|
Time domain |
required |