From: Sage Weil Date: Sat, 8 Feb 2020 19:15:06 +0000 (-0600) Subject: mgr/osd_perf_query: make table match ceph style X-Git-Tag: v15.1.1~276^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=695dd734d3ecf1f9f6b1d13fb602f90be834165b;p=ceph.git mgr/osd_perf_query: make table match ceph style Signed-off-by: Sage Weil --- diff --git a/src/pybind/mgr/osd_perf_query/module.py b/src/pybind/mgr/osd_perf_query/module.py index ee5c8ba8414..6f87c1d907a 100644 --- a/src/pybind/mgr/osd_perf_query/module.py +++ b/src/pybind/mgr/osd_perf_query/module.py @@ -115,9 +115,9 @@ class OSDPerfQuery(MgrModule): descriptors = query['performance_counter_descriptors'] if query == self.RBD_IMAGE_ID_QUERY: - column_names = ["pool_id", "rbd image_id"] + column_names = ["POOL_ID", "RBD IMAGE ID"] else: - column_names = [sk['type'] for sk in query['key_descriptor']] + column_names = [sk['type'].upper() for sk in query['key_descriptor']] for d in descriptors: desc = d if d in ['bytes']: @@ -126,10 +126,12 @@ class OSDPerfQuery(MgrModule): desc += '/sec' elif d in ['write_latency', 'read_latency']: desc += '(msec)' - column_names.append(desc) + column_names.append(desc.upper()) table = prettytable.PrettyTable(tuple(column_names), hrules=prettytable.FRAME) + table.left_padding_width = 0 + table.right_padding_width = 2 if query == self.RBD_IMAGE_ID_QUERY: # typical output: