Skip to content

Commit 5ff8f6f

Browse files
committed
monitor: done-or-unregistered runners are healthy too
1 parent 77af2a2 commit 5ff8f6f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

monitor/src/profile.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ impl Profile {
136136
+ self.idle_runner_count(runners)
137137
+ self.reserved_runner_count(runners)
138138
+ self.busy_runner_count(runners)
139+
+ self.done_or_unregistered_runner_count(runners)
139140
}
140141

141142
pub fn started_or_crashed_runner_count(&self, runners: &Runners) -> usize {
@@ -162,6 +163,12 @@ impl Profile {
162163
.count()
163164
}
164165

166+
pub fn done_or_unregistered_runner_count(&self, runners: &Runners) -> usize {
167+
self.runners(runners)
168+
.filter(|(_id, runner)| runner.status() == Status::DoneOrUnregistered)
169+
.count()
170+
}
171+
165172
pub fn excess_idle_runner_count(&self, runners: &Runners) -> usize {
166173
// Healthy runners beyond the target count are excess runners.
167174
let excess = if self.healthy_runner_count(runners) > self.target_runner_count() {

0 commit comments

Comments
 (0)