We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 23524f8 commit b9ff57cCopy full SHA for b9ff57c
metrics/cpu_enabled.go
@@ -31,6 +31,10 @@ func ReadCPUStats(stats *CPUStats) {
31
log.Error("Could not read cpu stats", "err", err)
32
return
33
}
34
+ if len(timeStats) == 0 {
35
+ log.Error("Empty cpu stats")
36
+ return
37
+ }
38
// requesting all cpu times will always return an array with only one time stats entry
39
timeStat := timeStats[0]
40
stats.GlobalTime = int64((timeStat.User + timeStat.Nice + timeStat.System) * cpu.ClocksPerSec)
0 commit comments