Time from requesting a worker until one was handed over, in fractional milliseconds. `outcome` is how the worker was found: "preferred" (same-guild vm still alive), "lru", or "queued" (pool was empty, waited for a return — the only outcome that can block unboundedly).
(outcome: &'static str, priority_index: usize, started_at: Instant)
| 416 | /// (same-guild vm still alive), "lru", or "queued" (pool was empty, waited |
| 417 | /// for a return — the only outcome that can block unboundedly). |
| 418 | fn record_claim_wait(outcome: &'static str, priority_index: usize, started_at: Instant) { |
| 419 | metrics::histogram!( |
| 420 | "bl.scheduler.worker_claim_wait", |
| 421 | "outcome" => outcome, |
| 422 | "priority_index" => priority_index.to_string(), |
| 423 | ) |
| 424 | .record(started_at.elapsed().as_secs_f64() * 1000.0); |
| 425 | } |
| 426 | |
| 427 | struct QueuedWorkerRequest { |
| 428 | guild_id: Id<GuildMarker>, |
no test coverage detected