From 2e9b1c75f93f552debf89ae0ffa7b5108d160258 Mon Sep 17 00:00:00 2001 From: Josh Durgin Date: Fri, 30 Dec 2011 19:27:27 -0800 Subject: [PATCH] rados: use testrados instead of testsnaps and testreadwrite --- teuthology/task/rados.py | 52 ++++++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 20 deletions(-) diff --git a/teuthology/task/rados.py b/teuthology/task/rados.py index 575f3ae043a54..795e04b3f81de 100644 --- a/teuthology/task/rados.py +++ b/teuthology/task/rados.py @@ -16,8 +16,11 @@ def task(ctx, config): clients: [client list] ops: objects: - maxinflight: - snaps: + max_in_flight: + object_size: + min_stride_size: + max_stride_size: + op_weights: For example:: @@ -27,39 +30,48 @@ def task(ctx, config): clients: [client.0] ops: 1000 objects: 25 - maxinflight: 16 - snaps: true + max_in_flight: 16 + object_size: 4000000 + min_stride_size: 1024 + max_stride_size: 4096 + op_weights: + read: 20 + write: 10 + delete: 2 + snap_create: 3 + rollback: 2 + snap_delete: 0 - interactive: """ log.info('Beginning rados...') assert isinstance(config, dict), \ "please list clients to run on" - tests = {} + object_size = int(config.get('object_size', 4000000)) + op_weights = config.get('op_weights', {}) args = [ 'CEPH_CONF=/tmp/cephtest/ceph.conf', 'LD_LIBRARY_PATH=/tmp/cephtest/binary/usr/local/lib', '/tmp/cephtest/enable-coredump', '/tmp/cephtest/binary/usr/local/bin/ceph-coverage', '/tmp/cephtest/archive/coverage', + '/tmp/cephtest/binary/usr/local/bin/testrados', + str(op_weights.get('read', 100)), + str(op_weights.get('write', 100)), + str(op_weights.get('delete', 10)), + str(op_weights.get('snap_create', 0)), + str(op_weights.get('snap_remove', 0)), + str(op_weights.get('rollback', 0)), + str(config.get('ops', 10000)), + str(config.get('objects', 500)), + str(config.get('max_in_flight', 16)), + str(object_size), + str(config.get('min_stride_size', object_size / 10)), + str(config.get('max_stride_size', object_size / 5)) ] - if config.get('snaps', False): - args.extend( - '/tmp/cephtest/binary/usr/local/bin/testreadwrite', - str(config.get('ops', '10000')), - str(config.get('objects', '500')), - str(50), - str(config.get('maxinflight', '16')) - ) - else: - args.extend( - '/tmp/cephtest/binary/usr/local/bin/testsnaps', - str(config.get('ops', '10000')), - str(config.get('objects', '500')), - str(config.get('maxinflight', '16')) - ) (mon,) = ctx.cluster.only('mon.0').remotes.iterkeys() + tests = {} for role in config.get('clients', ['client.0']): assert isinstance(role, basestring) PREFIX = 'client.' -- 2.39.5