Performance¶
Types¶
Generally, you do not need to instantiate CDP types yourself. Instead, the API creates objects for you as return values from commands, and then you can use those objects as arguments to other commands.
Commands¶
Each command is a generator function. The return
type Generator[x, y, z]
indicates that the generator
yields arguments of type x
, it must be resumed with
an argument of type y
, and it returns type z
. In
this library, types x
and y
are the same for all
commands, and z
is the return type you should pay attention
to. For more information, see
Getting Started: Commands.
-
cdp.performance.
disable
()¶ Disable collecting and reporting metrics.
Return type: Generator
[Dict
[str
,Any
],Dict
[str
,Any
],None
]
-
cdp.performance.
enable
()¶ Enable collecting and reporting metrics.
Return type: Generator
[Dict
[str
,Any
],Dict
[str
,Any
],None
]
-
cdp.performance.
get_metrics
()¶ Retrieve current values of run-time metrics.
Return type: Generator
[Dict
[str
,Any
],Dict
[str
,Any
],List
[Metric
]]Returns: Current values for run-time metrics.
-
cdp.performance.
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.
EXPERIMENTAL
Parameters: time_domain ( str
) – Time domainReturn type: Generator
[Dict
[str
,Any
],Dict
[str
,Any
],None
]
Events¶
Generally, you do not need to instantiate CDP events yourself. Instead, the API creates events for you and then you use the event’s attributes.