API
No overview available.
Attributes
| Attribute | Type | Description |
|---|---|---|
| Success | labeled.StopWatch | Stores a labeled.StopWatch instance to measure the duration of successful API operations. |
| Failure | labeled.StopWatch | Stores a labeled.StopWatch instance to measure the duration of failed API operations. |
Methods
Start()
@classmethod
def Start(
ctx: context.Context
) - > [APITimer](apitimer.md?sid=flytestdlib_metrics_apitimer)
Starts a timer for an API operation. This method is used to begin timing an API call, allowing for performance measurement and monitoring.
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for the API operation, used to carry deadlines, cancellation signals, and other request-scoped values across API boundaries. |
Returns
| Type | Description |
|---|---|
[APITimer](apitimer.md?sid=flytestdlib_metrics_apitimer) | An APITimer object that can be used to stop the timer and record the duration of the API operation. |