cache
format_bytes
def format_bytes(num: Union[int, float]) -> str
Efficient way to format bytes to human readable, simplified version of https://stackoverflow.com/a/63839503
CacheMetricsTracker
from dara.core.metrics.cache import CacheMetricsTracker
class CacheMetricsTracker(BaseModel)
Stores and aggregates cache sizes for metrics
Attributes
- registries: Dict[str, int]
- cache_store: int