def start_reverse_test(server_ip=DEFAULT_SERVER, cir=10): logger = getStreamLogger() try: client_utils.file_setter(LOGFILE) logger = getFileLogger(LOGFILE) except: pass ret_val = asyncio.get_event_loop().create_task(reverse_client(logger, server_ip, cir)) return ret_val
import asyncio import websockets import subprocess import re import sys import json import os, stat from utilities import client_utils from constants import * import traceback from datetime import datetime from log_settings import getStreamLogger, getFileLogger LOGFILE = datetime.today().strftime('logfiles/%Y-%m-%d-%H-%M-%S.log') FALLBACK_LOGGER = getStreamLogger() ''' retrieves the MTU from the server-side handler using the ./plpmtu-reverse C binary @PARAMS: SERVER_IP : server IPv4 address handler_port : port number of the application handling the mtu measurement process udp_port : port number of the application that performs the actual mtu process logger : logger object @RETURN: mtu : Maximum transmission unit in json string format ''' async def mtu_process(SERVER_IP,
import os import re import subprocess import time from utilities import client_utils import logging from log_settings import getStreamLogger from datetime import datetime from constants import * from analyzer_process import analyze_efficiency, analyze_buffer_delay GLOBAL_LOGGER = getStreamLogger() ''' Parses iperf3 process stdout data from a tempfile and returns the average and ideal throughput. @PARAMS: stdout_data : tempfile containing the Iperf3 process stdout rtt : the average round trip time recv_window : receiver window size of the server @RETURN: average_thpt : average throughput as taken from the tempfile ideal_thput : calculated theoretical throughput bound '''