add CgroupCPUUsageDocker just like CgroupCPUDocker
This commit is contained in:
parent
a11c78ba2c
commit
601dd00812
|
@ -149,6 +149,10 @@ func CgroupCPUDocker(containerid string) (*cpu.TimesStat, error) {
|
|||
return CgroupCPUDockerWithContext(context.Background(), containerid)
|
||||
}
|
||||
|
||||
func CgroupCPUUsageDocker(containerid string) (float64, error) {
|
||||
return CgroupCPUDockerUsageWithContext(context.Background(), containerid)
|
||||
}
|
||||
|
||||
func CgroupCPUDockerWithContext(ctx context.Context, containerid string) (*cpu.TimesStat, error) {
|
||||
return CgroupCPU(containerid, common.HostSys("fs/cgroup/cpuacct/docker"))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue