diff --git a/configs/l2fwd-echo-branch-lv1.click b/configs/l2fwd-echo-branch-lv1.click index 0700865..7e7d1f6 100644 --- a/configs/l2fwd-echo-branch-lv1.click +++ b/configs/l2fwd-echo-branch-lv1.click @@ -1,6 +1,3 @@ -//FromInput -> lv1_head :: RandomWeightedBranch({0}, {1}); -//lv1_head[0] -> L2Forward(method {2}) -> ToOutput(); -//lv1_head[1] -> L2Forward(method {2}) -> ToOutput(); -FromInput -> lv1_head :: RandomWeightedBranch(0.3, 0.7); -lv1_head[0] -> L2Forward(method echoback) -> ToOutput(); -lv1_head[1] -> L2Forward(method echoback) -> ToOutput(); +FromInput -> lv1_head :: RandomWeightedBranch({0}, {1}); +lv1_head[0] -> L2Forward(method {2}) -> ToOutput(); +lv1_head[1] -> L2Forward(method {2}) -> ToOutput(); diff --git a/scripts/run_all.sh b/scripts/run_all.sh index 671495b..29edabd 100755 --- a/scripts/run_all.sh +++ b/scripts/run_all.sh @@ -1,8 +1,8 @@ #! /bin/sh dropbox.py stop -./run_branch.py --branch-pred-type off -./run_branch.py --branch-pred-type always -./run_branch.py --branch-pred-type on +./run_branch.py --skip-dropbox --branch-pred-type off +./run_branch.py --skip-dropbox --branch-pred-type always +./run_branch.py --skip-dropbox --branch-pred-type on ./run_app_perf.py --prefix compbatching -b bin-backup/main --comp-batch-sizes 1,4,8,16,32,64 -p 64,256,1500 default.py ipv4-router.click --combine-cpu-gpu ./run_app_perf.py --prefix compbatching -b bin-backup/main --comp-batch-sizes 1,4,8,16,32,64 -p 64,256,1500 default.py ipv6-router.click --combine-cpu-gpu ./run_app_perf.py --prefix compbatching -b bin-backup/main --comp-batch-sizes 1,4,8,16,32,64 -p 64,256,1500 default.py ipsec-encryption.click --combine-cpu-gpu diff --git a/scripts/run_branch.py b/scripts/run_branch.py index 232e0e7..e145f9d 100755 --- a/scripts/run_branch.py +++ b/scripts/run_branch.py @@ -7,13 +7,16 @@ parser = argparse.ArgumentParser() parser.add_argument('--branch-pred-type', choices=('on', 'off', 'always'), required=True) - args = parser.parse_args() + parser.add_argument('--skip-dropbox', action='store_true', default=False) + args, extra_args = parser.parse_known_args() args.bin = 'bin-backup/main.branchpred.' + args.branch_pred_type #branch_configs = ["l2fwd-echo-branch-lv1.click"]#, "l2fwd-echo-branch-lv2.click", "l2fwd-echo-branch-lv3.click"] branch_config = 'l2fwd-echo-skewed-branch-lv3.click' + #branch_config = 'l2fwd-echo-branch-lv1.click' #branch_ratios = [50, 40, 30, 20, 10, 5, 1] - branch_ratios = [99, 95, 90, 80, 70, 60, 50, 40, 30, 20, 10, 5, 1] + #branch_ratios = [99, 95, 90, 80, 70, 60, 50, 40, 30, 20, 10, 5, 1] + branch_ratios = [90, 80, 60, 50, 40, 20, 10] conf_paths = [] os.chdir('..') @@ -34,16 +37,20 @@ os.chdir('scripts') # Run. - subprocess.run(['dropbox.py', 'stop']) - subprocess.run([ + if not args.skip_dropbox: subprocess.run(['dropbox.py', 'stop']) + main_args = [ './run_app_perf.py', '--prefix', 'branch-pred.' + args.branch_pred_type, '-b', args.bin, '-p', '64', + ] + main_args.extend(extra_args) + main_args.extend([ 'default.py', ','.join(conf_paths), ]) - subprocess.run(['dropbox.py', 'start']) + subprocess.run(main_args) + if not args.skip_dropbox: subprocess.run(['dropbox.py', 'start']) # Delete templated configs. os.chdir('..')