-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pybind/ceph_daemon: expand the order of magnitude of daemonperf statistics to ZB #21765
Conversation
src/pybind/ceph_daemon.py
Outdated
unit = 0 | ||
while len("%s" % (int(n) // (1000**unit))) > width - 1: | ||
unit += 1 | ||
if unit >= len(units) - 1: | ||
unit = len(units) - 1 | ||
break |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'd suggest apply following patch
diff --git a/src/pybind/ceph_daemon.py b/src/pybind/ceph_daemon.py
index 0ab5911955..79b0889470 100644
--- a/src/pybind/ceph_daemon.py
+++ b/src/pybind/ceph_daemon.py
@@ -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:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
instead of putting the bug report as the title of the commit message, could you summarize your change in the title? |
src/pybind/ceph_daemon.py
Outdated
unit = 0 | ||
while len("%s" % (int(n) // (1000**unit))) > width - 1: | ||
if unit >= len(units) -1: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add a space after -
.
daemonperf statistics to ZB Fixes: http://tracker.ceph.com/issues/23962 Signed-off-by: Guan yunfei <yunfei.guan@xtaotech.com>
Fixes: http://tracker.ceph.com/issues/23962
Signed-off-by: Guan yunfei yunfei.guan@xtaotech.com