Example #1
0
def run_experiment(alg, filename, results_folder):
    quic_cwnd_log = get_logname(alg, False, "-cwnd.log")
    ccp_cwnd_log = get_logname(alg, True, "-cwnd.log")
    cwnd_log = "loss-cwnd-{}.log".format(alg)
    cwnd_graph = "loss-cwnd-{}.pdf".format(alg)

    run_individual_exp(alg, filename, False, results_folder)
    run_individual_exp(alg, filename, True, results_folder)

    parse_cwnd(ccp_cwnd_log, quic_cwnd_log, cwnd_log)
    sh.check_output("./cwnd.R {} {}".format(cwnd_log, cwnd_graph), shell=True)
    sh.check_output("mv {} {}".format(cwnd_graph, results_folder), shell=True)
    for log in [ccp_cwnd_log, quic_cwnd_log, cwnd_log]:
        sh.check_output("rm {}".format(log), shell=True)
Example #2
0
def run_experiment(bw, delay, bdp, alg, filename):
    results_folder = "results/{}/".format(alg)
    quic_cwnd_log = get_cwnd_log(bw, delay, alg, False)
    ccp_cwnd_log = get_cwnd_log(bw, delay, alg, True)
    cwnd_log = "{}.log".format(get_cwnd_prefix(bw, delay, alg))
    cwnd_graph = "{}.pdf".format(get_cwnd_prefix(bw, delay, alg))

    run_individual_exp(bw, delay, bdp, alg, filename, False)
    run_individual_exp(bw, delay, bdp, alg, filename, True)

    # open both cwnd files and parse them into R file and produce graph
    parse_cwnd(ccp_cwnd_log, quic_cwnd_log, cwnd_log)
    (sh.Popen("./cwnd.R {} {}".format(cwnd_log, cwnd_graph),
              shell=True)).wait()
    (sh.Popen("mv {} {}".format(cwnd_graph, results_folder),
              shell=True)).wait()
    for log in [ccp_cwnd_log, quic_cwnd_log, cwnd_log]:
        sh.check_output("rm {}".format(log), shell=True)
Example #3
0
def run_cellular_exp(trace, delay, alg, filename, filesize, trial, graph_cwnd, trace_name = "VERIZON_LTE_SHORT", stats_file = None):
    trials_folder = generate_sub_folders(alg, CELLULAR, filesize, trial, delay=delay)
    # run single experiment with CCP
    run_single_cellular_exp(trace, delay, alg, filename, filesize, trial, graph_cwnd, True, trials_folder, trace_name = trace_name, stats_file = stats_file)

    # run single experiment without CCP
    run_single_cellular_exp(trace, delay, alg, filename, filesize, trial, graph_cwnd, False, trials_folder,  trace_name = trace_name, stats_file = stats_file)

    # if graph, do cwnd graphing
    if graph_cwnd:
        # run_single_fixed_exp moves things here automatically
        quic_cwnd_log = "{}.cwnd-log".format(cellular_log_prefix(trace_name, delay, alg, filesize, trial, False, trials_folder))
        ccp_cwnd_log = "{}.cwnd-log".format(cellular_log_prefix(trace_name, delay, alg, filesize, trial, True, trials_folder))
        cwnd_log = "{}.agg-cwnd-log".format(cellular_exp_prefix(trace_name, delay, alg, filesize, trial, trials_folder))
        cwnd_graph = "{}_cwnd.pdf".format(cellular_exp_prefix(trace_name, delay, alg, filesize, trial, trials_folder))
        parse_cwnd(ccp_cwnd_log, quic_cwnd_log, cwnd_log)
        sh.check_output("./cwnd.R {} {}".format(cwnd_log, cwnd_graph), shell=True)
        # delete the intermediate cwnd logs as info is saved in main cwnd log
        for log in [quic_cwnd_log, ccp_cwnd_log]:
            sh.check_output("rm {}".format(log), shell=True)
Example #4
0
def run_lossy_exp(bw, delay, alg, filename, filesize, trial, graph_cwnd, stats_file = None):
    # generate a results directory for this experiment
    trials_folder = generate_sub_folders(alg, LOSSY, filesize, trial, bw, delay)
    # make sure the specified bw trace file exists
    paths.gen_mahimahi_trace(bw)
    
    # run the experiment for CCP
    run_single_lossy_exp(bw, delay, alg, filename, filesize, trial, trials_folder, True, graph_cwnd, stats_file)

    # run the experiment for not CCP
    run_single_lossy_exp(bw, delay, alg, filename, filesize, trial, trials_folder, False, graph_cwnd, stats_file)

    # do the cwnd graphing
    if graph_cwnd:
        # run_single_fixed_exp moves things here automatically
        quic_cwnd_log = "{}.cwnd-log".format(lossy_log_prefix(bw, delay, alg, filesize, trial, False, trials_folder))
        ccp_cwnd_log = "{}.cwnd-log".format(lossy_log_prefix(bw, delay, alg, filesize, trial, True, trials_folder))
        cwnd_log = "{}.agg-cwnd-log".format(lossy_exp_prefix(bw, delay, alg, filesize, trial, trials_folder))
        cwnd_graph = "{}_cwnd.pdf".format(lossy_exp_prefix(bw, delay, alg, filesize, trial, trials_folder))
        parse_cwnd(ccp_cwnd_log, quic_cwnd_log, cwnd_log)
        sh.check_output("./cwnd.R {} {}".format(cwnd_log, cwnd_graph), shell=True)
        # delete the intermediate cwnd logs as info is saved in main cwnd log
        for log in [quic_cwnd_log, ccp_cwnd_log]:
            sh.check_output("rm {}".format(log), shell=True)