mgr/telemetry: define an actual function for stats_per_pg

This creates uniformity among the other functions, and makes it
so we can easily edit the content of this function if needed.

Signed-off-by: Laura Flores <lflores@redhat.com>
This commit is contained in:
Laura Flores 2021-12-16 07:04:51 +00:00
parent 996154b963
commit dedf2d4a3f

View File

@ -520,6 +520,9 @@ class Module(MgrModule):
return result
def get_stats_per_pg(self) -> dict:
return self.get('pg_dump')['pg_stats']
def gather_crashinfo(self) -> List[Dict[str, str]]:
crashlist: List[Dict[str, str]] = list()
errno, crashids, err = self.remote('crash', 'ls')
@ -970,7 +973,7 @@ class Module(MgrModule):
if 'perf' in channels:
report['perf_counters'] = self.gather_perf_counters('separated')
report['stats_per_pool'] = self.get_stats_per_pool()
report['stats_per_pg'] = self.get('pg_dump')['pg_stats']
report['stats_per_pg'] = self.get_stats_per_pg()
report['io_rate'] = self.get_io_rate()
report['osd_perf_histograms'] = self.get_osd_histograms('separated')
report['mempool'] = self.get_mempool('separated')