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

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
APITimerAn APITimer object that can be used to stop the timer and record the duration of the API operation.