def main(): args = parse_arguments('receiver_first') cc_repo = path.join(project_root.DIR, 'third_party', 'calibrated_koho') recv_src = path.join(cc_repo, 'datagrump', 'receiver') send_src = path.join(cc_repo, 'datagrump', 'sender') if args.option == 'run_first': print 'receiver' if args.option == 'setup': # apply patch to reduce MTU size apply_patch('calibrated_koho.patch', cc_repo) sh_cmd = './autogen.sh && ./configure && make -j2' check_call(sh_cmd, shell=True, cwd=cc_repo) if args.option == 'setup_after_reboot': check_default_qdisc('calibrated_koho') if args.option == 'receiver': cmd = [recv_src, args.port] check_call(cmd) if args.option == 'sender': cmd = [send_src, args.ip, args.port] check_call(cmd)
def main(): args = parse_arguments('receiver_first') cc_repo = path.join(project_root.DIR, 'third_party', 'sprout') model = path.join(cc_repo, 'src', 'examples', 'sprout.model') src = path.join(cc_repo, 'src', 'examples', 'sproutbt2') if args.option == 'deps': print ('libboost-math-dev libssl-dev libprotobuf-dev ' 'protobuf-compiler libncurses5-dev') if args.option == 'run_first': print 'receiver' if args.option == 'setup': # apply patch to reduce MTU size apply_patch('sprout.patch', cc_repo) sh_cmd = './autogen.sh && ./configure --enable-examples && make -j2' check_call(sh_cmd, shell=True, cwd=cc_repo) if args.option == 'setup_after_reboot': check_default_qdisc('sprout') if args.option == 'receiver': os.environ['SPROUT_MODEL_IN'] = model cmd = [src, args.port] check_call(cmd) if args.option == 'sender': os.environ['SPROUT_MODEL_IN'] = model cmd = [src, args.ip, args.port] check_call(cmd)
def main(): args = parse_arguments('receiver_first') cc_repo = path.join(project_root.DIR, 'third_party', 'pcc') recv_dir = path.join(cc_repo, 'receiver') send_dir = path.join(cc_repo, 'sender') recv_src = path.join(recv_dir, 'app', 'appserver') send_src = path.join(send_dir, 'app', 'appclient') if args.option == 'run_first': print 'receiver' if args.option == 'setup': # apply patch to reduce MTU size apply_patch('pcc.patch', cc_repo) check_call(['make'], cwd=recv_dir) check_call(['make'], cwd=send_dir) if args.option == 'setup_after_reboot': check_default_qdisc('pcc') if args.option == 'receiver': os.environ['LD_LIBRARY_PATH'] = path.join(recv_dir, 'src') cmd = [recv_src, args.port] check_call(cmd) if args.option == 'sender': os.environ['LD_LIBRARY_PATH'] = path.join(send_dir, 'src') cmd = [send_src, args.ip, args.port] # suppress debugging output to stderr with open(os.devnull, 'w') as devnull: check_call(cmd, stderr=devnull)
def main(): args = parse_arguments('receiver_first') cc_repo = path.join(project_root.DIR, 'third_party', 'sprout') model = path.join(cc_repo, 'src', 'examples', 'sprout.model') src = path.join(cc_repo, 'src', 'examples', 'sproutbt2') if args.option == 'deps': print( 'libboost-math-dev libssl-dev libprotobuf-dev ' 'protobuf-compiler libncurses5-dev') if args.option == 'run_first': print 'receiver' if args.option == 'setup': # apply patch to reduce MTU size apply_patch('sprout.patch', cc_repo) sh_cmd = './autogen.sh && ./configure --enable-examples && make -j2' check_call(sh_cmd, shell=True, cwd=cc_repo) if args.option == 'setup_after_reboot': check_default_qdisc('sprout') if args.option == 'receiver': os.environ['SPROUT_MODEL_IN'] = model cmd = [src, args.port] check_call(cmd) if args.option == 'sender': os.environ['SPROUT_MODEL_IN'] = model cmd = [src, args.ip, args.port] check_call(cmd)
def main(): args = parse_arguments('sender_first') cc_repo = path.join(project_root.DIR, 'third_party', 'verus') send_src = path.join(cc_repo, 'src', 'verus_server') recv_src = path.join(cc_repo, 'src', 'verus_client') if args.option == 'deps': print 'libtbb-dev libasio-dev libalglib-dev libboost-system-dev' if args.option == 'run_first': print 'sender' if args.option == 'setup': # apply patch to reduce MTU size apply_patch('verus.patch', cc_repo) sh_cmd = './bootstrap.sh && ./configure && make -j2' check_call(sh_cmd, shell=True, cwd=cc_repo) if args.option == 'setup_after_reboot': check_default_qdisc('verus') if args.option == 'sender': cmd = [send_src, '-name', TMPDIR, '-p', args.port, '-t', '75'] check_call(cmd) if args.option == 'receiver': cmd = [recv_src, args.ip, '-p', args.port] check_call(cmd, cwd=TMPDIR)