Adds iperf timeout for bandwith measurements.
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user