]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/osd_perf_query: make table match ceph style
authorSage Weil <sage@redhat.com>
Sat, 8 Feb 2020 19:15:06 +0000 (13:15 -0600)
committerSage Weil <sage@redhat.com>
Sun, 23 Feb 2020 21:47:03 +0000 (15:47 -0600)
Signed-off-by: Sage Weil <sage@redhat.com>
src/pybind/mgr/osd_perf_query/module.py

index ee5c8ba8414e02437ebdc831090d226b65031b7f..6f87c1d907a9c4e10b415367512031cd0e5a9d99 100644 (file)
@@ -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: