The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
fix: guard print_aggregate against empty latencies
Ryan Crabbee0ddb2a52529
diff --git a/scripts/benchmark_mock.py b/scripts/benchmark_mock.pyindex f02f50e41f2..057002883f9 100644--- a/scripts/benchmark_mock.py+++ b/scripts/benchmark_mock.py@@ -103,6 +103,11 @@ def print_aggregate(results):total_failures = sum(r["failures"] for r in results)total_requests = sum(r["n_requests"] for r in results)n = len(all_latencies)++ if not all_latencies:+ print(f"\n Aggregate: all {total_requests} requests failed across {len(results)} runs")+ return+mean = statistics.mean(all_latencies) * 1000p50 = all_latencies[n // 2] * 1000p95 = all_latencies[int(n * 0.95)] * 1000