From 5b622d08550a9d48a15ab9e0c4a41a485cb307b0 Mon Sep 17 00:00:00 2001 From: Mark Nelson Date: Tue, 17 Oct 2017 09:34:59 -0400 Subject: [PATCH] benchmark/getput.py: rename tests->test, object/container changes to support 1 container Signed-off-by: Mark Nelson --- benchmark/getput.py | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/benchmark/getput.py b/benchmark/getput.py index 935faa2d..cc03b9f3 100644 --- a/benchmark/getput.py +++ b/benchmark/getput.py @@ -25,14 +25,14 @@ def __init__(self, cluster, config): self.object_prefix = config.get('object_prefix', 'cbt-getput') self.procs = config.get('procs', 1) self.ops_per_proc = config.get('ops_per_proc', None) - self.tests = config.get('tests', "p") + self.test = config.get('test', "p") self.op_size = config.get('op_size', 4194304) self.ctype = config.get('ctype', None) self.debug = config.get('debug', None) self.logops = config.get('logops', None) self.grace = config.get('grace', None) - self.run_dir = '%s/osd_ra-%08d/op_size-%08d/procs-%08d/%s/%s' % (self.run_dir, int(self.osd_ra), int(self.op_size), int(self.procs), self.tests, self.ctype) - self.out_dir = '%s/osd_ra-%08d/op_size-%08d/procs-%08d/%s/%s' % (self.archive_dir, int(self.osd_ra), int(self.op_size), int(self.procs), self.tests, self.ctype) + self.run_dir = '%s/osd_ra-%08d/op_size-%08d/procs-%08d/%s/%s' % (self.run_dir, int(self.osd_ra), int(self.op_size), int(self.procs), self.test, self.ctype) + self.out_dir = '%s/osd_ra-%08d/op_size-%08d/procs-%08d/%s/%s' % (self.archive_dir, int(self.osd_ra), int(self.op_size), int(self.procs), self.test, self.ctype) self.pool_profile = config.get('pool_profile', 'default') self.cmd_path = config.get('cmd_path', "/usr/bin/getput") self.user = config.get('user', 'cbt') @@ -79,11 +79,19 @@ def mkgetputcmd(self, cred_file, gwnum): # Set the options if self.container_prefix is not None: - getput_cmd += '-c%s-gw%s ' % (self.container_prefix, gwnum) + container_prefix_flag = '-c%s' % self.container_prefix + if self.ctype == 'byproc' or self.ctype == 'bynodegw': + container_prefix_flag = '%s-gw%s' % (container_prefix_flag, gwnum) + getput_cmd += '%s ' % container_prefix_flag + + # For now we'll only test distinct objects per client/gw if self.object_prefix is not None: - getput_cmd += '-o%s ' % self.object_prefix + getput_cmd += '-o%s-`%s`-gw%s ' % (self.object_prefix, common.get_fqdn_cmd(), gwnum) + else: + getput_cmd += '-o`%s`-gw%s ' % (common.get_fqdn_cmd(), gwnum) + getput_cmd += '-s%s ' % self.op_size - getput_cmd += '-t%s ' % self.tests + getput_cmd += '-t%s ' % self.test getput_cmd += '--procs %s ' % self.procs if self.ops_per_proc is not None: getput_cmd += '-n%s ' % self.ops_per_proc @@ -122,7 +130,7 @@ def run(self): # Run getput monitoring.start(self.run_dir) - logger.info('Running getput %s test.' % self.tests) + logger.info('Running getput %s test.' % self.test) ps = [] for i in xrange(0, len(self.auth_urls)):