瀏覽代碼

Adds iperf timeout for bandwith measurements.

master
Lukas Prause 3 年之前
父節點
當前提交
b7634fb791
共有 1 個檔案被更改,包括 28 行新增17 行删除
  1. +28
    -17
      measurement_main.py

+ 28
- 17
measurement_main.py 查看文件

@@ -373,10 +373,13 @@ class Server:
is_measurement_done = False
while not is_measurement_done:
try:
subprocess.call(iperf_command, timeout=float(time) + 1.0 + TIMEOUT_OFFSET)
is_measurement_done = True
except:
print_message("iPerf timed out. Retry...")
try:
subprocess.call(iperf_command, timeout=float(time) + 1.0 + TIMEOUT_OFFSET)
is_measurement_done = True
except:
print_message("iPerf timed out. Retry...")
except KeyboardInterrupt:
exit()
processHandler.kill_all()
congestion_control_index = (congestion_control_index + 1) % len(
tcp_algo
@@ -445,13 +448,15 @@ class Server:
str(self.config["port"]),
"--one-off",
]
is_measurement_done = False
while not is_measurement_done:
try:
subprocess.call(iperf_command, timeout=float(time) + 1.0 + TIMEOUT_OFFSET)
is_measurement_done = True
except:
print_message("iPerf timed out. Retry...")
try:
subprocess.call(iperf_command, timeout=float(time) + 1.0 + TIMEOUT_OFFSET)
is_measurement_done = True
except:
print_message("iPerf timed out. Retry...")
except KeyboardInterrupt:
exit()
sleep(2)
processHandler.kill_all()
congestion_control_index = (congestion_control_index + 1) % len(
@@ -817,10 +822,13 @@ class Client:
is_measurement_done = False
while not is_measurement_done:
try:
subprocess.call(iperf_command, timeout=float(time) + 2.0 + TIMEOUT_OFFSET)
is_measurement_done = True
except:
print_message("iPerf timed out. Retry...")
try:
subprocess.call(iperf_command, timeout=float(time) + 2.0 + TIMEOUT_OFFSET)
is_measurement_done = True
except:
print_message("iPerf timed out. Retry...")
except KeyboardInterrupt:
exit()
sleep(4)
processHandler.kill_all()
congestion_control_index = (congestion_control_index + 1) % len(
@@ -878,10 +886,13 @@ class Client:
is_measurement_done = False
while not is_measurement_done:
try:
subprocess.call(iperf_command, timeout=float(time) + 2.0 + TIMEOUT_OFFSET)
is_measurement_done = True
except:
print_message("iPerf timed out. Retry...")
try:
subprocess.call(iperf_command, timeout=float(time) + 2.0 + TIMEOUT_OFFSET)
is_measurement_done = True
except:
print_message("iPerf timed out. Retry...")
except KeyboardInterrupt:
exit()
processHandler.kill_all()
congestion_control_index = (congestion_control_index + 1) % len(
tcp_algo

Loading…
取消
儲存