MCPcopy Create free account
hub / github.com/Botloader/botloader / record_claim_wait

Function record_claim_wait

components/scheduler/src/vmworkerpool.rs:418–425  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

416/// (same-guild vm still alive), "lru", or "queued" (pool was empty, waited
417/// for a return — the only outcome that can block unboundedly).
418fn 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
427struct QueuedWorkerRequest {
428 guild_id: Id<GuildMarker>,

Callers 1

inner_get_workerMethod · 0.85

Calls 1

recordMethod · 0.80

Tested by

no test coverage detected