소스 검색

Adds iperf timeout for bandwith measurements.

master
Lukas Prause 3 년 전
부모
커밋
9b50b91388
1개의 변경된 파일28개의 추가작업 그리고 16개의 파일을 삭제
  1. +28
    -16
      measurement_main.py

+ 28
- 16
measurement_main.py 파일 보기

self.config["server"], self.config["server"],
self.config["port"], self.config["port"],
) )
try:
subprocess.call(iperf_command, timeout=float(time) + 1 + TIMEOUT_OFFSET)
except:
print_message("iPerf timed out. Going ahead with next measurement...")
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...")
processHandler.kill_all() processHandler.kill_all()
congestion_control_index = (congestion_control_index + 1) % len( congestion_control_index = (congestion_control_index + 1) % len(
tcp_algo tcp_algo
str(self.config["port"]), str(self.config["port"]),
"--one-off", "--one-off",
] ]
try:
subprocess.call(iperf_command, timeout=float(time) + 1.0 + TIMEOUT_OFFSET)
except:
print_message("iPerf timed out. Going ahead with next measurement...")
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...")
sleep(2) sleep(2)
processHandler.kill_all() processHandler.kill_all()
congestion_control_index = (congestion_control_index + 1) % len( congestion_control_index = (congestion_control_index + 1) % len(
"-C", "-C",
tcp_algo[congestion_control_index], tcp_algo[congestion_control_index],
] ]
try:
subprocess.call(iperf_command, timeout=float(time) + 2 + TIMEOUT_OFFSET)
except:
print_message("iPerf timed out. Going ahead with next measurement...")
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...")
sleep(4) sleep(4)
processHandler.kill_all() processHandler.kill_all()
congestion_control_index = (congestion_control_index + 1) % len( congestion_control_index = (congestion_control_index + 1) % len(
self.config["port"], self.config["port"],
) )
sleep(2) sleep(2)
try:
subprocess.call(iperf_command, timeout=float(time)+ 2 + TIMEOUT_OFFSET)
except:
print_message("iPerf timed out. Going ahead with next measurement...")
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...")
processHandler.kill_all() processHandler.kill_all()
congestion_control_index = (congestion_control_index + 1) % len( congestion_control_index = (congestion_control_index + 1) % len(
tcp_algo tcp_algo

Loading…
취소
저장