in postgresql_metrics/metrics_logic.py [0:0]
def get_all_metrics_now(db_connections, conf):
"""Get all the metrics immediately without any scheduling.
First gets the global stats with first available database connection,
and then gets the rest per database.
"""
db_functions, global_db_functions = get_all_stats_functions_from_conf(conf)
data_dir = figure_out_postgres_data_dir(db_connections[0], conf)
all_metrics = _call_all_db_functions(global_db_functions, (data_dir, db_connections[0]))
for db_connection in db_connections:
all_metrics.extend(_call_all_db_functions(db_functions, (data_dir, db_connection)))
return all_metrics