| tcp_algo[congestion_control_index], | tcp_algo[congestion_control_index], | ||||
| ] | ] | ||||
| is_measurement_done = False | is_measurement_done = False | ||||
| while not is_measurement_done: | |||||
| iperf_return = 0 | |||||
| while not is_measurement_done or iperf_return != 0: | |||||
| try: | try: | ||||
| try: | try: | ||||
| subprocess.call(iperf_command, timeout=float(time) + TIMEOUT_OFFSET) | |||||
| iperf_return = subprocess.call(iperf_command, timeout=float(time) + TIMEOUT_OFFSET) | |||||
| is_measurement_done = True | is_measurement_done = True | ||||
| except: | except: | ||||
| print_message("iPerf timed out. Retry...") | print_message("iPerf timed out. Retry...") | ||||
| ) | ) | ||||
| sleep(2) | sleep(2) | ||||
| is_measurement_done = False | is_measurement_done = False | ||||
| while not is_measurement_done: | |||||
| iperf_return = 0 | |||||
| while not is_measurement_done or iperf_return != 0: | |||||
| try: | try: | ||||
| try: | try: | ||||
| subprocess.call(iperf_command, timeout=float(time) + TIMEOUT_OFFSET) | |||||
| iperf_return = subprocess.call(iperf_command, timeout=float(time) + TIMEOUT_OFFSET) | |||||
| is_measurement_done = True | is_measurement_done = True | ||||
| except: | except: | ||||
| print_message("iPerf timed out. Retry...") | print_message("iPerf timed out. Retry...") |