feat: add adaptive pool metrics and self-check

This commit is contained in:
fawney19
2026-05-15 02:21:11 +08:00
parent bf511f9f8c
commit 54a8312e46
34 changed files with 4521 additions and 300 deletions
@@ -236,6 +236,11 @@ async fn gateway_handles_admin_pool_overview_locally_with_trusted_admin_principa
assert_eq!(items[0]["active_keys"], 1);
assert_eq!(items[0]["cooldown_count"], 0);
assert_eq!(items[0]["pool_enabled"], true);
assert_eq!(items[0]["provider_hot_count"], 0);
assert_eq!(items[0]["provider_desired_hot"], 0);
assert_eq!(items[0]["provider_in_flight"], 0);
assert_eq!(items[0]["provider_ema_in_flight"], 0.0);
assert_eq!(items[0]["provider_burst_pending"], false);
assert_eq!(*upstream_hits.lock().expect("mutex should lock"), 0);
gateway_handle.abort();