]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/telemetry: revise format_perf_histogram 44251/head
authorYaarit Hatuka <yaarit@redhat.com>
Wed, 12 Jan 2022 23:33:08 +0000 (23:33 +0000)
committerYaarit Hatuka <yaarit@redhat.com>
Thu, 13 Jan 2022 21:54:07 +0000 (21:54 +0000)
osd_perf_histograms now include only separated stats; remove the
aggregated formatting; we can revert this in case we ever add aggregated
histograms.

Signed-off-by: Yaarit Hatuka <yaarit@redhat.com>
src/pybind/mgr/telemetry/module.py

index ca039afe611bc061618d529dfb88668d59981775..45baa1a5cc5ca718d9a6cef7fa2cde00ad6986ab 100644 (file)
@@ -1295,22 +1295,17 @@ class Module(MgrModule):
         # they are displayed horizontally instead of vertically.
         try:
             # Formatting ranges and values in osd_perf_histograms
-            modes_to_be_formatted = ['osd_perf_histograms_aggregated', 'osd_perf_histograms_separated']
-            for mode in modes_to_be_formatted:
-                for config in report[mode]:
-                    for histogram in config:
-                        # Adjust ranges by converting lists into strings
-                        for axis in config[histogram]['axes']:
-                            for i in range(0, len(axis['ranges'])):
-                                axis['ranges'][i] = str(axis['ranges'][i])
-                        # Adjust values by converting lists into strings
-                        if mode == 'osd_perf_histograms_aggregated':
-                            for i in range(0, len(config[histogram]['values'])):
-                                config[histogram]['values'][i] = str(config[histogram]['values'][i])
-                        else: # if mode == 'osd_perf_histograms_separated'
-                            for osd in config[histogram]['osds']:
-                                for i in range(0, len(osd['values'])):
-                                    osd['values'][i] = str(osd['values'][i])
+            mode = 'osd_perf_histograms'
+            for config in report[mode]:
+                for histogram in config:
+                    # Adjust ranges by converting lists into strings
+                    for axis in config[histogram]['axes']:
+                        for i in range(0, len(axis['ranges'])):
+                            axis['ranges'][i] = str(axis['ranges'][i])
+
+                    for osd in config[histogram]['osds']:
+                        for i in range(0, len(osd['values'])):
+                            osd['values'][i] = str(osd['values'][i])
         except KeyError:
             # If the perf channel is not enabled, there should be a KeyError since
             # 'osd_perf_histograms' would not be present in the report. In that case,