Skip to content

Commit

Permalink
pybind/ceph_daemon: expand the order of magnitude of
Browse files Browse the repository at this point in the history
daemonperf statistics to ZB

Fixes: http://tracker.ceph.com/issues/23962
Signed-off-by: Guan yunfei <yunfei.guan@xtaotech.com>
  • Loading branch information
YunfeiGuan committed May 2, 2018
1 parent 7e4f7c7 commit a9d6f8a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pybind/ceph_daemon.py
Expand Up @@ -184,9 +184,11 @@ def format_dimless(self, n, width):
Format a number without units, so as to fit into `width` characters, substituting
an appropriate unit suffix.
"""
units = [' ', 'k', 'M', 'G', 'T', 'P']
units = [' ', 'k', 'M', 'G', 'T', 'P', 'E', 'Z']
unit = 0
while len("%s" % (int(n) // (1000**unit))) > width - 1:
if unit >= len(units) - 1:
break;
unit += 1

if unit > 0:
Expand Down

0 comments on commit a9d6f8a

Please sign in to comment.