From 13af7cbb025b6d948df29e8cba75cbaff33720b4 Mon Sep 17 00:00:00 2001 From: Ajay Anubolu <124525760+AjAnubolu@users.noreply.github.com> Date: Thu, 5 Mar 2026 15:58:17 -0800 Subject: [PATCH] fix: use consistent time denominator for throughput metrics in bench_one_batch_server (#19223) --- python/sglang/test/bench_one_batch_server_internal.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/sglang/test/bench_one_batch_server_internal.py b/python/sglang/test/bench_one_batch_server_internal.py index 4585340da..1a5755b1d 100644 --- a/python/sglang/test/bench_one_batch_server_internal.py +++ b/python/sglang/test/bench_one_batch_server_internal.py @@ -600,8 +600,8 @@ def run_one_case( # Compute metrics latency = time.perf_counter() - tic - input_throughput = batch_size * input_len / last_ttft - output_throughput = batch_size * output_len / (latency - last_ttft) + input_throughput = batch_size * input_len / latency + output_throughput = batch_size * output_len / latency overall_throughput = batch_size * (input_len + output_len) / latency if backend == "vllm":