Chore(benchmark): Reduce server keep-alive delay in benchmark table script
authorSam Mirazi <sasan345@gmail.com>
Mon, 2 Jun 2025 04:54:44 +0000 (21:54 -0700)
committerSam Mirazi <sasan345@gmail.com>
Mon, 2 Jun 2025 04:54:44 +0000 (21:54 -0700)
commitce56fe33cb8aebdb1540fa75d7bcfa57e2af5b9a
tree5746ae7164ac0a53b3b2b62c73e03943851683f8
parenta53dc65677fa5c09dd60fb9365f439e461dbbbae
Chore(benchmark): Reduce server keep-alive delay in benchmark table script

This commit updates the `run_benchmark_table.py` script to shorten the keep-alive duration for web servers (FastAPI and Flask) after their respective benchmark tests complete and their pages are opened in the browser.

Previously, the script would pause for 5 seconds to allow manual viewing of the opened page. This duration has been reduced to 2 seconds.

Specific changes:
- Modified the `time.sleep()` call from `time.sleep(5)` to `time.sleep(2)` within the main scenario loop.
- Updated the corresponding console message `console.print(f"[blue]Keeping server alive for ... seconds to view the page...[/blue]")` to reflect the new 2-second delay.

This change streamlines the benchmark execution process by reducing the waiting period, making the overall benchmarking cycle faster, while still allowing a brief moment to visually confirm the server's response. This refinement is part of ongoing efforts to optimize the benchmarking utilities.
run_benchmark_table.py