示例#1
0
    args = parser.parse_args()
    return args


if __name__ == '__main__':
    setup_loggers()
    ctx = parse_args()
    settings.initialize(ctx)

    iteration = 0
    logger.debug("Settings.cluster: %s", settings.cluster)
    global_init = {}
    # FIXME: Create ClusterFactory and parametrically match benchmarks and clusters.
    cluster = Ceph(settings.cluster)
    while (iteration < settings.cluster.get("iterations", 0)):
        benchmarks = benchmarkfactory.getAll(cluster, iteration)
        for b in benchmarks:
            if b.exists():
                continue
            # Tell the benchmark to initialize unless it's in the skip list.
            if not b.getclass() in global_init:
                b.initialize()
                # Skip future initializations unless rebuild requested.
                if not settings.cluster.get('rebuild_every_test', False):
                    global_init[b.getclass()] = b
            b.run()
            if not b.getclass() in global_init:
                b.cleanup()
        iteration += 1
    for k, b in global_init.items():
        b.cleanup()
示例#2
0
        help = 'The ceph.conf file to use.',
        )
    parser.add_argument(
        'config_file',
        help = 'YAML config file.',
        )
    args = parser.parse_args()
    return args

if __name__ == '__main__':
    ctx = parse_args()
    settings.initialize(ctx)

    iteration = 0
    print settings.cluster
    global_init = {} 
    while (iteration < settings.cluster.get("iterations", 0)):
        benchmarks = benchmarkfactory.getAll(iteration)
        for b in benchmarks:
            if b.exists():
                continue

            if not b.getclass() in global_init:
                b.initialize()
                if not settings.cluster.get('rebuild_every_test', False):
                    global_init[b.getclass()] = True
            b.run()
            if not b.getclass() in global_init:
                b.cleanup()
        iteration += 1
示例#3
0
        )
    args = parser.parse_args()
    print args
    return args

if __name__ == '__main__':
    ctx = parse_args()
    settings.initialize(ctx)

    iteration = 0
    print settings.cluster
    global_init = {} 
    # FIXME: Create ClusterFactory and parametrically match benchmarks and clusters.
    cluster = Ceph(settings.cluster)
    while (iteration < settings.cluster.get("iterations", 0)):
        benchmarks = benchmarkfactory.getAll(cluster, iteration)
        for b in benchmarks:
            if b.exists():
                continue
            # Tell the benchmark to initialize unless it's in the skip list.
            if not b.getclass() in global_init:
                b.initialize()
                # Skip future initializations unless rebuild requested.
                if not settings.cluster.get('rebuild_every_test', False):
                    global_init[b.getclass()] = b
            b.run()
            if not b.getclass() in global_init:
                b.cleanup()
        iteration += 1
    for k,b in global_init.items():
        b.cleanup()