diff --git a/benchmark_serving.py b/benchmark_serving.py index 5e482d7..e25bb02 100644 --- a/benchmark_serving.py +++ b/benchmark_serving.py @@ -461,6 +461,8 @@ async def limited_request_func(request_func_input, pbar): pbar=pbar))) outputs: List[RequestFuncOutput] = await asyncio.gather(*tasks) + benchmark_duration = time.perf_counter() - benchmark_start_time + if profile: print("Stopping profiler...") profile_input = RequestFuncInput( @@ -479,8 +481,6 @@ async def limited_request_func(request_func_input, pbar): if pbar is not None: pbar.close() - benchmark_duration = time.perf_counter() - benchmark_start_time - metrics, actual_output_lens = calculate_metrics( input_requests=input_requests, outputs=outputs,