Skip to content

Commit

Permalink
Benchmarks: Added pause time between benchmarks run
Browse files Browse the repository at this point in the history
  • Loading branch information
francis-clairicia committed Sep 28, 2024
1 parent 7c1079d commit fbd325d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions benchmark_server/run_benchmark
Original file line number Diff line number Diff line change
Expand Up @@ -817,10 +817,8 @@ def _start_docker_instance(

while (elapsed_time := time.monotonic() - start) < timeout:
sock = socket.socket(family, socket_type)
sock.settimeout(min(0.1, timeout - elapsed_time))
sock.settimeout(min(0.5, timeout - elapsed_time))
try:
if socket_type == SOCK_DGRAM and family == socket.AF_INET:
sock.bind(("127.0.0.1", 0))
sock.connect(server_address)
if socket_type == SOCK_DGRAM:
if ping_over_ssl:
Expand Down Expand Up @@ -1015,6 +1013,8 @@ def main() -> None:
warmup_cmd = benchmark["client"] + warmup
print(shlex.join(warmup_cmd))
subprocess.check_output(warmup_cmd)
print("-> Warm up done.")
time.sleep(1)
print()

benchmark_data: _BenchmarkData = {
Expand Down Expand Up @@ -1060,6 +1060,9 @@ def main() -> None:

benchmark_data["variation"].append(data)

# Pause time between benchmarks run
time.sleep(1)

# Pause time between server creation
time.sleep(1)

Expand Down

0 comments on commit fbd325d

Please sign in to comment.