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 payload_count Number of payloads stored or retrieved externally.
Class Variable total_duration Wall-clock time spent on external storage operations.
Class Variable total_size Total size in bytes of externally stored/retrieved payloads.
def record_batch(self, count: int, size: int, duration: timedelta): (source)

Record metrics from a batch of storage operations.

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

payload_count: int = (source)

Number of payloads stored or retrieved externally.

total_duration: timedelta = (source)

Wall-clock time spent on external storage operations.

total_size: int = (source)

Total size in bytes of externally stored/retrieved payloads.