Skip to content

Commit

Permalink
refs #15: Clean up experiment scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
achimnol committed Apr 19, 2016
1 parent bdb575b commit ec3b79a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 14 deletions.
9 changes: 3 additions & 6 deletions configs/l2fwd-echo-branch-lv1.click
Original file line number Diff line number Diff line change
@@ -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();
6 changes: 3 additions & 3 deletions scripts/run_all.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down
17 changes: 12 additions & 5 deletions scripts/run_branch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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('..')
Expand All @@ -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('..')
Expand Down

0 comments on commit ec3b79a

Please sign in to comment.