]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/ceph_daemon: expand the order of magnitude of 21765/head
authorYunfeiGuan <yunfeiguan@xtaotech.com>
Wed, 2 May 2018 08:10:28 +0000 (16:10 +0800)
committerYunfeiGuan <yunfeiguan@xtaotech.com>
Wed, 2 May 2018 08:10:28 +0000 (16:10 +0800)
daemonperf statistics to ZB

Fixes: http://tracker.ceph.com/issues/23962
Signed-off-by: Guan yunfei <yunfei.guan@xtaotech.com>
src/pybind/ceph_daemon.py

index 0ab5911955d0143279ad35f55eb7050d404e57c4..b1c5750f3bdc748d68237e15c57a3d9d4459d3cf 100644 (file)
@@ -184,9 +184,11 @@ class DaemonWatcher(object):
         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: