diff options
author | nicolargo <nicolas@nicolargo.com> | 2023-08-12 10:45:51 +0200 |
---|---|---|
committer | nicolargo <nicolas@nicolargo.com> | 2023-08-12 10:45:51 +0200 |
commit | 1a197aa4067980cc06b23ea5aed159ccbb8d7edb (patch) | |
tree | 7841b942fecb50b636321de9b0cbd10a2ffd0ce8 | |
parent | 5da07da87e3759772a898187ca943ff0061fe8af (diff) |
Change log for future debug
-rw-r--r-- | glances/plugins/plugin/model.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/glances/plugins/plugin/model.py b/glances/plugins/plugin/model.py index 161e4990..297c642e 100644 --- a/glances/plugins/plugin/model.py +++ b/glances/plugins/plugin/model.py @@ -1210,27 +1210,27 @@ class GlancesPluginModel(object): def wrapper(self, *args, **kw): # Call the method - stat = fct(self, *args, **kw) - if self.get_key() and 'sda' in stat: - logger.info("stat (fct): {}".format(stat['sda'].get('read_bytes_gauge', None))) + stats = fct(self, *args, **kw) + if self.get_key() and 'sda' in stats: + logger.info("stat (fct): {}".format(stats['sda'])) time_since_update = getTimeSinceLastUpdate(self.plugin_name) if self.stats_old: if self.get_key() is None: - compute_rate(self, stat, self.stats_old, time_since_update) + compute_rate(self, stats, self.stats_old, time_since_update) else: # logger.info("Compute rate for {}".format(self.plugin_name)) # logger.info("stat_old: {}".format(self.stats_old['sda'].get('read_bytes_gauge', None))) - # logger.info("stat (before rate): {}".format(stat['sda'].get('read_bytes_gauge', None))) - for key in stat: - compute_rate(self, stat[key], self.stats_old[key], time_since_update) - # logger.info("stat (after rate): {}".format(stat['sda']['read_bytes_gauge'])) + # logger.info("stat (before rate): {}".format(stats['sda'].get('read_bytes_gauge', None))) + for key in stats: + compute_rate(self, stats[key], self.stats_old[key], time_since_update) + # logger.info("stat (after rate): {}".format(stats['sda']['read_bytes_gauge'])) # Memorized the current stats for next run - self.stats_old = copy.deepcopy(stat) + self.stats_old = copy.deepcopy(stats) - return stat + return stats return wrapper |