From 7debd7a962696765464bd0ecc253ccd039e31dfe Mon Sep 17 00:00:00 2001 From: Ibrar Ahmed Date: Thu, 3 Mar 2022 17:25:07 +0000 Subject: [PATCH] PG-355: Collect accumulative value of sys_time and user_time. Collect accumulative value of sys_time and user_time, because separate value for each same query will override the previous value. --- pg_stat_monitor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pg_stat_monitor.c b/pg_stat_monitor.c index 7de3dd3..05ee7e0 100644 --- a/pg_stat_monitor.c +++ b/pg_stat_monitor.c @@ -1347,8 +1347,8 @@ pgss_update_entry(pgssEntry *entry, e->counters.calls.usage += USAGE_EXEC(total_time); if (sys_info) { - e->counters.sysinfo.utime = sys_info->utime; - e->counters.sysinfo.stime = sys_info->stime; + e->counters.sysinfo.utime += sys_info->utime; + e->counters.sysinfo.stime += sys_info->stime; } if (walusage) {