driver/collector/postgres_collector.py
def _aggregated_local_stats(self, local_metric: Dict[str, Any]) -> Dict[str, Any]:
        """Get Aggregated local metrics by summing all values"""

        for category, data in local_metric.items():
            views = self.PG_STAT_VIEWS_LOCAL[category]
            for view in views:
                query = self.PG_STAT_LOCAL_QUERY[view]
                rows = self._get_metrics(query)
                data[view] = {}
                if len(rows) > 0:
                    data[view]["aggregated"] = rows[0]
        return local_metric
Get Aggregated local metrics by summing all values
Get Aggregated local metrics by summing all values
Get Aggregated local metrics by summing all values
def _aggregated_local_stats(self, local_metric: Dict[str, Any]) -> Dict[str, Any]:
        for category, data in local_metric.items():
            views = self.PG_STAT_VIEWS_LOCAL[category]
            for view in views:
                query = self.PG_STAT_LOCAL_QUERY[view]
                rows = self._get_metrics(query)
                data[view] = {}
                if len(rows) > 0:
                    data[view]["aggregated"] = rows[0]
        return local_metric
def _aggregated_local_stats ( self , local_metric : Dict [ str , Any ] ) -> Dict [ str , Any ] : for category , data in local_metric . items ( ) : views = self . PG_STAT_VIEWS_LOCAL [ category ] for view in views : query = self . PG_STAT_LOCAL_QUERY [ view ] rows = self . _get_metrics ( query ) data [ view ] = { } if len ( rows ) > 0 : data [ view ] [ "aggregated" ] = rows [ 0 ] return local_metric
Get Aggregated local metrics by summing all values
Get Aggregated local metrics by summing all values
"""Get Aggregated local metrics by summing all values"""
self
local_metric
Dict[str, Any]