Skip to content

Commit

Permalink
fix NaN then load is zero
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel Safonov committed May 3, 2024
1 parent 6c923dc commit 41d80b6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,10 @@ func calcIdlePoolLoad(ctx *Context, cpuInfo *numa.Info) {

pool.IdleLoad0 = load

load1 := pool.IdleLoad0 / pool.IdleLoadFull0
load1 := float64(0)
if pool.IdleLoadFull0 != 0 {
load1 = pool.IdleLoad0 / pool.IdleLoadFull0
}
load1 *= 100
pool.IdleLoad1 = load1

Expand Down

0 comments on commit 41d80b6

Please sign in to comment.