class documentation

class StorageOperationMetrics: (source)

View In Hierarchy

Accumulates metrics from external storage operations.

Method record_batch Record metrics from a batch of storage operations.
Method track Set this instance as the current metrics context and reset on exit.
Class Variable driver_names Names of the drivers that participated in the operations.
Class Variable payload_count Number of payloads stored or retrieved externally.
Class Variable total_size Total size in bytes of externally stored/retrieved payloads.
Property total_duration Wall-clock time spent on external storage operations.
Class Variable _spans Monotonic-clock start and end of each recorded batch.
def record_batch(self, count: int, size: int, start: float, end: float, driver_names: set[str]): (source)

Record metrics from a batch of storage operations.

Set this instance as the current metrics context and reset on exit.

driver_names: set[str] = (source)

Names of the drivers that participated in the operations.

payload_count: int = (source)

Number of payloads stored or retrieved externally.

total_size: int = (source)

Total size in bytes of externally stored/retrieved payloads.

Wall-clock time spent on external storage operations.

Monotonic-clock start and end of each recorded batch.