Background: Today CPU utilization calculations are outsourced to github.com/struCoder/pidusage. At the time when implementing this, I was looking for a quick way to calculate this since my original code did not produce accurate results; this was mostly due to ignorance on my part on how CPU quotas and periods work with cgroups. While iterating over the processes in the cgroup to fetch CPU usage works today, I'd like to perform this calculation from cgstat.
Deliverable: Calculate CPU utilization using CPU quota, period and CPUUsage.Total. Remove dependency on pidusage.
Background: Today CPU utilization calculations are outsourced to
github.com/struCoder/pidusage. At the time when implementing this, I was looking for a quick way to calculate this since my original code did not produce accurate results; this was mostly due to ignorance on my part on how CPU quotas and periods work with cgroups. While iterating over the processes in the cgroup to fetch CPU usage works today, I'd like to perform this calculation from cgstat.Deliverable: Calculate CPU utilization using CPU quota, period and
CPUUsage.Total. Remove dependency onpidusage.