]>
git.proxmox.com Git - ceph.git/blob - ceph/qa/tasks/omapbench.py
2 Run omapbench executable within teuthology
7 from teuthology
.orchestra
import run
8 from teuthology
import misc
as teuthology
10 log
= logging
.getLogger(__name__
)
12 @contextlib.contextmanager
13 def task(ctx
, config
):
17 The config should be as follows::
20 clients: [client list]
21 threads: <threads at once>
22 objects: <number of objects to write>
23 entries: <number of entries per object map>
24 keysize: <number of characters per object map key>
25 valsize: <number of characters per object map val>
26 increment: <interval to show in histogram (in ms)>
27 omaptype: <how the omaps should be generated>
44 log
.info('Beginning omapbench...')
45 assert isinstance(config
, dict), \
46 "please list clients to run on"
48 testdir
= teuthology
.get_testdir(ctx
)
49 print(str(config
.get('increment',-1)))
50 for role
in config
.get('clients', ['client.0']):
51 assert isinstance(role
, basestring
)
53 assert role
.startswith(PREFIX
)
54 id_
= role
[len(PREFIX
):]
55 (remote
,) = ctx
.cluster
.only(role
).remotes
.iterkeys()
59 " ".join(['adjust-ulimits',
61 '{tdir}/archive/coverage',
63 '--name', role
[len(PREFIX
):],
64 '-t', str(config
.get('threads', 30)),
65 '-o', str(config
.get('objects', 1000)),
66 '--entries', str(config
.get('entries',10)),
67 '--keysize', str(config
.get('keysize',10)),
68 '--valsize', str(config
.get('valsize',1000)),
69 '--inc', str(config
.get('increment',10)),
70 '--omaptype', str(config
.get('omaptype','uniform'))
71 ]).format(tdir
=testdir
),
73 logger
=log
.getChild('omapbench.{id}'.format(id=id_
)),
82 log
.info('joining omapbench')
83 run
.wait(omapbench
.itervalues())