Merge pull request #177 from darkfronza/PG-311_fix_cumulative_cpu_system_time

PG-311: Fix cpu_time and system_time accumulation.
pull/178/head
Ibrar Ahmed 2022-01-24 18:44:39 +05:00 committed by GitHub
commit 9ebf66ec04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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)
{