Skip to content

Commit

Permalink
refactor: get overall cpu usage
Browse files Browse the repository at this point in the history
  • Loading branch information
cokemine committed Apr 19, 2022
1 parent eea74c9 commit b68994e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/status/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func Disk(INTERVAL *float64) (uint64, uint64) {
}

func Cpu(INTERVAL *float64) float64 {
cpuInfo, _ := cpu.Percent(time.Duration(*INTERVAL*float64(time.Second)), true)
cpuInfo, _ := cpu.Percent(time.Duration(*INTERVAL*float64(time.Second)), false)
return math.Round(cpuInfo[0]*10) / 10
}

Expand Down

0 comments on commit b68994e

Please sign in to comment.