def start(self): self.logger.info("Starting CPU Bench for %d seconds" % self.message.running_time) self.starting() HL.run_sysbench_cpu(self.message.hw, self.message.running_time, self.message.cpu_instances) self.completed()
def cpu_perf(hw_, testing_time=10, burn_test=False): ' Detect the cpu speed' result = HL.get_value(hw_, 'cpu', 'logical', 'number') physical = HL.get_value(hw_, 'cpu', 'physical', 'number') # Individual Test aren't useful for burn_test if burn_test is False: if physical is not None: sys.stderr.write('CPU Performance: %d logical ' 'CPU to test (ETA: %d seconds)\n' % (int(physical), (int(physical) + 1) * testing_time)) for cpu_nb in get_one_cpu_per_socket(hw_): get_bogomips(hw_, cpu_nb) get_cache_size(hw_, cpu_nb) HL.run_sysbench_cpu(hw_, testing_time, 1, cpu_nb) else: sys.stderr.write('CPU Burn: %d logical' ' CPU to test (ETA: %d seconds)\n' % ( int(result), testing_time)) HL.run_sysbench_cpu(hw_, testing_time, int(result))
def cpu_perf(hw_, testing_time=10, burn_test=False): ' Detect the cpu speed' result = HL.get_value(hw_, 'cpu', 'logical', 'number') physical = HL.get_value(hw_, 'cpu', 'physical', 'number') # Individual Test aren't useful for burn_test if burn_test is False: if physical is not None: sys.stderr.write('CPU Performance: %d logical ' 'CPU to test (ETA: %d seconds)\n' % (int(physical), (int(physical) + 1) * testing_time)) for cpu_nb in get_one_cpu_per_socket(hw_): get_bogomips(hw_, cpu_nb) get_cache_size(hw_, cpu_nb) HL.run_sysbench_cpu(hw_, testing_time, 1, cpu_nb) else: sys.stderr.write('CPU Burn: %d logical' ' CPU to test (ETA: %d seconds)\n' % (int(result), testing_time)) HL.run_sysbench_cpu(hw_, testing_time, int(result))