Skip to content

Commit 86ccc65

Browse files
authored
chore(engine): report saturation as load when there are no workers (#19925)
Signed-off-by: Robert Fratto <[email protected]>
1 parent cd0c578 commit 86ccc65

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/engine/internal/scheduler/collector.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package scheduler
22

33
import (
44
"context"
5-
"math"
65
"time"
76

87
"github.com/prometheus/client_golang/prometheus"
@@ -138,7 +137,8 @@ func computeSaturation(sched *Scheduler) float64 {
138137
})
139138

140139
if compute == 0 {
141-
return math.Inf(1)
140+
// If we have no compute capacity, fall back to the load as our ratio.
141+
return float64(load)
142142
}
143143
return float64(load) / float64(compute)
144144
}

0 commit comments

Comments
 (0)