Fix formating

This commit is contained in:
Florian Vahl 2021-12-29 13:48:20 +01:00 committed by GitHub
parent d679478769
commit 53649399fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -76,10 +76,10 @@ func (c *Docker) Stop() {
}
func (c *Docker) ReadCPU(stats *api.Stats) {
ncpus := uint8(stats.CPUStats.OnlineCPUs)
if ncpus == 0 {
ncpus = uint8(len(stats.CPUStats.CPUUsage.PercpuUsage))
}
ncpus := uint8(stats.CPUStats.OnlineCPUs)
if ncpus == 0 {
ncpus = uint8(len(stats.CPUStats.CPUUsage.PercpuUsage))
}
total := float64(stats.CPUStats.CPUUsage.TotalUsage)
system := float64(stats.CPUStats.SystemCPUUsage)