mirror of
https://github.com/percona/pg_stat_monitor.git
synced 2026-02-04 14:06:20 +00:00
PG-311: Fix cpu_time and system_time accumulation.
Fixed a small typo introduced by commit
eaa9c08e24: PG-316: Convert blocks
timings to average per buckets.
The e->counters.sysinfo.utime = and e->counters.sysinfo.stime =
operations should be += to accumulate the results and calculate the
average correctly.
This commit is contained in:
@@ -1358,8 +1358,8 @@ pgss_update_entry(pgssEntry *entry,
|
||||
}
|
||||
if (sys_info)
|
||||
{
|
||||
e->counters.sysinfo.utime = (int64)(sys_info->utime - e->counters.sysinfo.utime)/e->counters.calls.calls;
|
||||
e->counters.sysinfo.stime = (int64)(sys_info->stime - e->counters.sysinfo.stime)/e->counters.calls.calls;
|
||||
e->counters.sysinfo.utime += (int64)(sys_info->utime - e->counters.sysinfo.utime)/e->counters.calls.calls;
|
||||
e->counters.sysinfo.stime += (int64)(sys_info->stime - e->counters.sysinfo.stime)/e->counters.calls.calls;
|
||||
}
|
||||
if (walusage)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user