driver/collector/postgres_collector.py
def _raw_local_stats(self, local_metric: Dict[str, Any]) -> Dict[str, Any]:
        """Get raw local metrics without aggregation"""

        for category, data in local_metric.items():
            views = self.PG_STAT_VIEWS_LOCAL[category]
            views_key = self.PG_STAT_VIEWS_LOCAL_KEY[category]
            for view in views:
                query = f"SELECT * FROM {view};"
                rows = self._get_metrics(query)
                data[view] = {}
                for row in rows:
                    key = row.get(views_key)
                    data[view][key] = row
        return local_metric
Get raw local metrics without aggregation
Get raw local metrics without aggregation
Get raw local metrics without aggregation
def _raw_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]
            views_key = self.PG_STAT_VIEWS_LOCAL_KEY[category]
            for view in views:
                query = f"SELECT * FROM {view};"
                rows = self._get_metrics(query)
                data[view] = {}
                for row in rows:
                    key = row.get(views_key)
                    data[view][key] = row
        return local_metric
def _raw_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 ] views_key = self . PG_STAT_VIEWS_LOCAL_KEY [ category ] for view in views : query = f"SELECT * FROM {view};" rows = self . _get_metrics ( query ) data [ view ] = { } for row in rows : key = row . get ( views_key ) data [ view ] [ key ] = row return local_metric
Get raw local metrics without aggregation
Get raw local metrics without aggregation
"""Get raw local metrics without aggregation"""
self
local_metric
Dict[str, Any]