[skip ci] Add desc comments for GetCPUUsage (#9066)

Signed-off-by: dragondriver <jiquan.long@zilliz.com>
pull/9067/head
dragondriver 2021-10-02 12:07:56 +08:00 committed by GitHub
parent 2e47e38b9d
commit 1d5062b63a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -29,6 +29,7 @@ func GetCPUCoreCount(logical bool) int {
return c
}
// GetCPUUsage returns the cpu usage in percentage.
func GetCPUUsage() float64 {
percents, err := cpu.Percent(0, false)
if err != nil {