MCPcopy Create free account
hub / github.com/apache/datafusion / human_size

Function human_size

benchmarks/compile_profile.py:166–172  ·  view source on GitHub ↗
(size: int)

Source from the content-addressed store, hash-verified

164
165
166def human_size(size: int) -> str:
167 value = float(size)
168 for unit in ("B", "KB", "MB", "GB", "TB"):
169 if value < 1024 or unit == "TB":
170 return f"{value:6.1f}{unit}"
171 value /= 1024
172 return f"{value:6.1f}TB"
173
174
175def main() -> None:

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…