Przeglądaj źródła

Adds iperf timeout for bandwith measurements.

master
Lukas Prause 3 lat temu
rodzic
commit
04f3b385ec
1 zmienionych plików z 4 dodań i 6 usunięć
  1. +4
    -6
      measurement_main.py

+ 4
- 6
measurement_main.py Wyświetl plik

@@ -370,9 +370,7 @@ class Server:
self.config["server"],
self.config["port"],
)

subprocess.call(iperf_command)

processHandler.kill_all()
congestion_control_index = (congestion_control_index + 1) % len(
tcp_algo
@@ -441,9 +439,7 @@ class Server:
str(self.config["port"]),
"--one-off",
]

subprocess.call(iperf_command)

sleep(2)
processHandler.kill_all()
congestion_control_index = (congestion_control_index + 1) % len(
@@ -810,10 +806,11 @@ class Client:
while not is_measurement_done:
try:
try:
subprocess.call(iperf_command, timeout=float(time) + 2.0 + TIMEOUT_OFFSET)
subprocess.call(iperf_command, timeout=float(time) + TIMEOUT_OFFSET)
is_measurement_done = True
except:
print_message("iPerf timed out. Retry...")
reconnect_modem()
except KeyboardInterrupt:
exit()
sleep(4)
@@ -874,10 +871,11 @@ class Client:
while not is_measurement_done:
try:
try:
subprocess.call(iperf_command, timeout=float(time) + 2.0 + TIMEOUT_OFFSET)
subprocess.call(iperf_command, timeout=float(time) + TIMEOUT_OFFSET)
is_measurement_done = True
except:
print_message("iPerf timed out. Retry...")
reconnect_modem()
except KeyboardInterrupt:
exit()
processHandler.kill_all()

Ładowanie…
Anuluj
Zapisz