Beispiel #1
0
def main():
    """ Starts the experiment. """

    # shared.sync_clocks()
    shared.error_log('New run: ' + str(datetime.datetime.now()))

    # Initialize output directories.
    shared.run_cmd('mkdir -p ../out-pickle')
    shared.run_cmd('mkdir -p ../out-graph')

    for flow_count in [100, 500, 1000, 1500]:

        for forward_bw in [1200]:

#            reset_state()            
#            try:
#                switch.reset_flow_table()
#                switch.add_rules(flow_count)
#            except Exception, err:
#                print 'Cannot add rules:', repr(err)
#                continue

            time.sleep(2)

            config.pkt_size = 1400
            config.flow_count = flow_count
            config.max_time = 60
            config.target_bw_Mbps = forward_bw

            shared.safe_run(run_and_save, 'direct')
Beispiel #2
0
def main():
    
    f = open('install_rules.log', 'w')
    
    for pkt_size in [64]:
        #for gap_ms in [1,5,10,20,50,100,200,400]:
        for gap_ms in [10]:
            
            print >> f, pkt_size, gap_ms,            
            for _ in range(1):
                print >> f, shared.safe_run(send_and_count, pkt_size, gap_ms),
                f.flush()
                
            print >> f, ''

    f.close()
Beispiel #3
0
def plot(exp_name):

    global EXP_NAME
    EXP_NAME = exp_name

    f = open('../out-pickle/%s.pickle' % EXP_NAME)
    stat_dict = pickle.load(f)
    f.close()

    print 'Plotting', EXP_NAME
    shared.safe_run(percentage_bw_flow_id, stat_dict)
    # rtt_flow_id(stat_dict)
    shared.safe_run(rtt_seq_three_special_flows, stat_dict)
    shared.safe_run(cdf_rtt, stat_dict)