예제 #1
0
파일: main.py 프로젝트: PlatformLab/epaxos
if __name__ == '__main__':
    parser = argparse.ArgumentParser()
    parser.add_argument('--rsync', help='Whether to copy the latest version of '
        'the files with all machines', default=False, action='store_true')
    parser.add_argument('--off', help='Whether to power off the machines at the'
        ' end of running the experiments', default=False, action='store_true')
    args = parser.parse_args()
    if args.rsync:
        utils.run_verbose('Rsyncing instances', topo.rsync)
        print()

    try:
        print('##################')
        print('## Reproduction ##')
        print('##################')
        repro_arrival_rate = Experiment.OutstandingReqArrivalRate(1)
        reproduction_expts = [
            Experiment(MPAXOS_PROTO, Experiment.ZipfianWorkload(),
                repro_arrival_rate),
            Experiment(EPAXOS_PROTO, Experiment.ZipfianWorkload(),
                repro_arrival_rate),
            Experiment(EPAXOS_PROTO, Experiment.FixedConflictWorkload(0),
                repro_arrival_rate),
            Experiment(EPAXOS_PROTO, Experiment.FixedConflictWorkload(2),
                repro_arrival_rate),
            Experiment(EPAXOS_PROTO, Experiment.FixedConflictWorkload(100),
                repro_arrival_rate),
        ]
        run(reproduction_expts, 'results/reproduction_1or', trials=1)
        graphs.reproduction_bar('results/reproduction_1or')