def run(self): CBCLogger.debug("Run Benchmark in another thread.") for i in self.benchmarks: for j in self.parallels: j.run() i.run() CBCLogger.debug("Run Benchmarks Done.")
def parse_config(self): for i in config_map: object_value = self.config_yaml.get(i) if object_value != None: self.config_objs.append( globals()[config_map.get(i)](object_value)) print(self.config_objs) CBCLogger.debug("Parse config file.")
def read_config(self): try: with open(self.config_file) as f: self.config_yaml = yaml.safe_load(f) print(self.config_yaml) CBCLogger.debug("Read config file.") except IOError as e: raise argparse.ArgumentTypeError(str(e))
def run(self): CBCLogger.debug("Executor start to run.") for i in self.exec_objs: #CBCLogger.debug("Iterate execute obj:"+i.__class__.__name__+",parent obj:"+i.__class__.__bases__[0].__name__) if i.__class__.__bases__[0].__name__ == 'BenchmarkExecutor': #mrunner = BenchThread(i) #mrunner.start() self.benchmarks.append(i) elif i.__class__.__bases__[0].__name__ == 'ToolExecutor': #i.run() self.parallels.append(i) mrunner = MainThread(self.benchmarks, self.parallels) mrunner.start() self.state = ExecState.Running mrunner.join() self.state = ExecState.Completed
def build(self): CBCLogger.debug("Build Fio source code.")
def cleanup(self): CBCLogger.debug("Clean up the cluster.")
def run(self): CBCLogger.debug("Run Ceph cluster.")
def setup(self): CBCLogger.debug("Setup and deploy Ceph cluster.")
def check_bottleneck(self): CBCLogger.debug("Check bottleneck is in Ceph.") return True
def run(self): CBCLogger.debug("Run Parser.")
def build(self): CBCLogger.debug("Build Parser source code.")
def run(self): CBCLogger.debug("Run Dstat in another thread.") CBCLogger.debug("Run Dstat Start.") time.sleep(10) CBCLogger.debug("Run Dstat End.")
def setup(self): CBCLogger.debug("Setup Dstat.")
def build(self): CBCLogger.debug("Build Dstat source code.")
def run(self): CBCLogger.info("Deploy Ceph cluster.") CBCLogger.debug("(optional) Add ceph repo.") ret = subprocess.call("cephadm add-repo --release octopus", shell=True) if ret != 0: CBCLogger.error("(optional) Add ceph repo failed.") return RetCode.Error CBCLogger.debug("Bootstrap cephadm monitor.") ret = subprocess.call("cephadm bootstrap --mon-ip 10.239.241.85", shell=True) if ret != 0: CBCLogger.error("Bootstrap cephadm monitor failed.") return RetCode.Error CBCLogger.debug("Ceph orch add vol1.") ret = subprocess.call("cephadm shell -- ceph orch daemon add osd ceph8:ceph_volumes/vol1", shell=True) if ret != 0: CBCLogger.error("Ceph orch add vol1 failed.") return RetCode.Error CBCLogger.debug("Ceph orch add vol2.") ret = subprocess.call("cephadm shell -- ceph orch daemon add osd ceph8:ceph_volumes/vol2", shell=True) if ret != 0: CBCLogger.error("Ceph orch add vol1 failed.") return RetCode.Error CBCLogger.debug("Ceph orch add vol3.") ret = subprocess.call("cephadm shell -- ceph orch daemon add osd ceph8:ceph_volumes/vol3", shell=True) if ret != 0: CBCLogger.error("Ceph orch add vol1 failed.") return RetCode.Error CBCLogger.debug("Ceph orch add vol4.") ret = subprocess.call("cephadm shell -- ceph orch daemon add osd ceph8:ceph_volumes/vol4", shell=True) if ret != 0: CBCLogger.error("Ceph orch add vol1 failed.") return RetCode.Error return RetCode.OK
def setup(self): CBCLogger.debug("Setup Fio.")
def run(self): CBCLogger.debug("Run Fio Start.") time.sleep(10) CBCLogger.debug("Run Fio End.")
def setup(self): CBCLogger.debug("Setup Parser.")