def __init__(self, cluster, config): self.config = config self.cluster = cluster # self.cluster = Ceph(settings.cluster) self.archive_dir = "%s/%s/%08d/%s%s" % ( settings.cluster.get('archive_dir'), "results", config.get('iteration'), "id", hash(frozenset((self.config).items()))) self.run_dir = "%s/%08d/%s" % (settings.cluster.get('tmp_dir'), config.get('iteration'), self.getclass()) self.osd_ra = config.get('osd_ra', None) self.cmd_path = '' self.valgrind = config.get('valgrind', None) self.cmd_path_full = '' self.log_iops = config.get('log_iops', True) self.log_bw = config.get('log_bw', True) self.log_lat = config.get('log_lat', True) if self.valgrind is not None: self.cmd_path_full = common.setup_valgrind(self.valgrind, self.getclass(), self.run_dir) self.osd_ra_changed = False if self.osd_ra: self.osd_ra_changed = True else: self.osd_ra = common.get_osd_ra()
def __init__(self, archive_dir, cluster, config): self.acceptable = config.pop('acceptable', {}) self.config = config self.cluster = cluster hashable = json.dumps(sorted(self.config.items())).encode() digest = hashlib.sha1(hashable).hexdigest()[:8] self.archive_dir = os.path.join( archive_dir, 'results', '{:0>8}'.format(config.get('iteration')), 'id-{}'.format(digest)) self.run_dir = os.path.join(settings.cluster.get('tmp_dir'), '{:0>8}'.format(config.get('iteration')), self.getclass()) self.osd_ra = config.get('osd_ra', None) self.cmd_path = '' self.valgrind = config.get('valgrind', None) self.cmd_path_full = '' self.log_iops = config.get('log_iops', True) self.log_bw = config.get('log_bw', True) self.log_lat = config.get('log_lat', True) if self.valgrind is not None: self.cmd_path_full = common.setup_valgrind(self.valgrind, self.getclass(), self.run_dir) self.osd_ra_changed = False if self.osd_ra: self.osd_ra_changed = True else: self.osd_ra = common.get_osd_ra()
def __init__(self, cluster, config): self.config = config self.cluster = cluster # self.cluster = Ceph(settings.cluster) self.archive_dir = "%s/%08d/%s" % (settings.cluster.get('archive_dir'), config.get('iteration'), self.getclass()) self.run_dir = "%s/%08d/%s" % (settings.cluster.get('tmp_dir'), config.get('iteration'), self.getclass()) self.osd_ra = config.get('osd_ra', None) self.cmd_path = '' self.valgrind = config.get('valgrind', None) self.cmd_path_full = '' if self.valgrind is not None: self.cmd_path_full = common.setup_valgrind(self.valgrind, self.getclass(), self.run_dir) self.osd_ra_changed = False if self.osd_ra: self.osd_ra_changed = True else: self.osd_ra = common.get_osd_ra()