Skip to main content

API

No overview available.

Attributes

AttributeTypeDescription
Successlabeled.StopWatchStores a labeled.StopWatch instance to measure the duration of successful API operations.
Failurelabeled.StopWatchStores 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

NameTypeDescription
ctxcontext.ContextThe context for the API operation, used to carry deadlines, cancellation signals, and other request-scoped values across API boundaries.

Returns

TypeDescription
[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.