pub struct Metrics {
pub dp_rank: u32,
pub active_blocks: u64,
pub inactive_blocks: u64,
pub total_blocks: u64,
pub cache_usage: f64,
pub physical_cache_usage: f64,
pub running_requests: u64,
pub waiting_requests: u64,
pub preemptions_total: u64,
pub sglang_cache_hit_tokens: u64,
pub sglang_cache_total_tokens: u64,
}Expand description
Rank-local scheduler and G1 metrics.
Fields§
§dp_rank: u32§active_blocks: u64Backend-native legacy occupied-block count. vLLM reports blocks referenced by active requests; SGLang reports occupied page-pool blocks, including evictable radix-resident pages.
inactive_blocks: u64Reusable resident blocks not included in active_blocks. This is
currently populated by vLLM; SGLang reports zero because its legacy
occupied count already includes radix-resident pages.
total_blocks: u64§cache_usage: f64active_blocks / total_blocks, with backend-native semantics above.
physical_cache_usage: f64Physical resident fraction. This includes inactive reusable vLLM blocks
and equals cache_usage for SGLang’s legacy occupied-page metric.
running_requests: u64§waiting_requests: u64§preemptions_total: u64§sglang_cache_hit_tokens: u64SGLang radix-cache tokens reused by the most recently completed pass.
Backends without an equivalent pass-local metric report zero.
sglang_cache_total_tokens: u64Total SGLang prefill tokens considered by the most recently completed pass. Backends without an equivalent pass-local metric report zero.