def get_ec2_experiments(instance, ec2, region): server = generate_experiments.HOST_POTATO client = generate_experiments.HOST_AWS_TEMPLATE client['ip_wan'] = instance.public_ip_address client['ip_lan'] = instance.private_ip_address client['key_filename'] = get_key_pair_path(ec2) # create config and output config = generate_experiments.all_ccalgs_config( server, client, btlbw=10, rtt=1, end_time=60, exp_name_suffix=region.replace('-', ''), queue_sizes=[32, 64, 128, 256, 512, 1024, 2048]) #queue_sizes=[32, 64, 128, 256, 512]) config_filename = 'experiments-all-ccalgs-aws-{}.yaml'.format( region.replace('-', '')) logging.info('Writing config file {}'.format(config_filename)) with open(config_filename, 'w') as f: yaml.dump(config, f, default_flow_style=False) experiments = cctestbed.load_experiments(config, config_filename, force=True) return experiments
def get_taro_experiments(networks=None, force=True, loss=None, ccalgs=CCALGS): if networks is None: ntwrk_conditions = [(5,35,16), (5,85,64), (5,130,64), (5,275,128), (10,35,32), (10,85,128), (10,130,128), (10,275,256), (15,35,64), (15,85,128), (15,130,256), (15,275,512)] else: ntwrk_conditions = networks experiments = {} for btlbw, rtt, queue_size in ntwrk_conditions: rtts = [rtt] config = generate_experiments.ccalg_predict_config( btlbw=btlbw, rtts=rtts, end_time=60, exp_name_suffix='local', queue_sizes=[queue_size], ccalgs=ccalgs, loss=loss) config_filename = 'experiments-ccalg-predict-{}bw-{}rtt-{}q-{}.yaml'.format( btlbw, rtt, queue_size, datetime.now().strftime('%Y%m%d')) logging.info('Writing config file {}'.format(config_filename)) with open(config_filename, 'w') as f: yaml.dump(config, f, default_flow_style=False) experiments.update(cctestbed.load_experiments(config, config_filename, force=force)) return experiments
def test_load_experiments(config, request): experiments = mut.load_experiments(config[0], config[1]) def remove_experiment_description_log(): for experiment in experiments.values(): # later tests could delete description log (see: compress_logs text) if os.path.exists(experiment.logs['description_log']): os.remove(experiment.logs['description_log']) request.addfinalizer(remove_experiment_description_log) assert (len(experiments) == 2) assert (experiments['cubic'].queue_size == 8) assert (experiments['cubic-bbr'].queue_size == 1024) assert (len(experiments['cubic'].flows) == 1) assert (len(experiments['cubic-bbr'].flows) == 2) return experiments[request.param]
def get_taro_experiments(): experiments = {} for rtt in [35, 85, 130, 275]: for btlbw in [5, 10, 15]: queue_size = QUEUE_SIZE_TABLE[rtt][btlbw] config = generate_experiments.ccalg_predict_config_websites( btlbw=btlbw, rtt=rtt, end_time=60, exp_name_suffix='taro', queue_size=queue_size) config_filename = 'experiments-ccalg-predict-{}bw-{}rtt.yaml'.format(btlbw, rtt) logging.info('Writing config file {}'.format(config_filename)) with open(config_filename, 'w') as f: yaml.dump(config, f, default_flow_style=False) experiments.update(cctestbed.load_experiments(config, config_filename, force=True)) return experiments
def get_taro_experiments(): experiments = {} # url_exp = pd.read_csv('url-exp-metadata-cdns.csv') #'url-exp-metadata-all.csv') #for queue_size in [64, 128, 256]: """ ntwrk_conditions = {17: {10: 16}, 21: {10: 32}, 26: {10: 32}, 31: {10: 32}, 32: {10: 32}, 38: {10: 32}, 42: {10: 64}, 43: {10: 64}, 52: {10: 64}, 61: {10: 64}, 63: {10: 64}, 65: {10: 64}, 68: {10: 64}, 70: {10: 64}, 76: {10: 64}, 93: {10: 128}, 97: {10: 128}, 106: {10: 128}, 117: {10: 128}, 127: {10: 128}, 137: {10: 128}, 143: {10: 128}, 148: {10: 128}, 162: {10: 256}, 170: {10: 256}, 195: {10: 256}, 206: {10: 256}, 227: {10: 256}, 247: {10: 256}, 260: {10: 256}, 302: {10: 256}, 343: {10: 512}, 412: {10: 512}, 481: {10: 512}, 550: {10: 512}} """ for rtt in [35, 85, 130, 275]: for btlbw in [5, 10, 15]: #loss_rates = [1e-6, 1e-5, 1e-4, 1e-3, 1e-2, 1e-1] queue_size = QUEUE_SIZE_TABLE[rtt][btlbw] rtts = [rtt] config = generate_experiments.ccalg_predict_config( btlbw=btlbw, rtts=rtts, end_time=60, exp_name_suffix='taro', queue_sizes=[queue_size]) #loss_rates=loss_rates) config_filename = 'experiments-ccalg-predict-{}bw-{}rtt-{}q-{}.yaml'.format( btlbw, rtt, queue_size, datetime.now().strftime('%Y%m%d')) logging.info('Writing config file {}'.format(config_filename)) with open(config_filename, 'w') as f: yaml.dump(config, f, default_flow_style=False) experiments.update( cctestbed.load_experiments(config, config_filename, force=True)) return experiments