summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/utils.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/utils.py b/lib/utils.py
index 3f5b610..208db44 100644
--- a/lib/utils.py
+++ b/lib/utils.py
@@ -55,6 +55,8 @@ def human_readable(value, unit):
("m", 1e-3),
("", 1),
("k", 1e3),
+ ("M", 1e6),
+ ("G", 1e9),
):
if value < 1e3 * factor:
return "{:.2f} {}{}".format(value * (1 / factor), prefix, unit)