def Run(benchmark_spec):
  vms = benchmark_spec.vms
  vm = vms[0]
  logging.info('Sysbench OLTP Results:')
  sysbench_cmd = SYSBENCH_CMD + '--num-threads=%s ' % vm.num_cpus
  stdout, _ = vm.RemoteCommand(sysbench_cmd + 'run', should_log=True)
  match = re.search('\\s+transactions:.+\\(([0-9]+\\.[0-9]+)', stdout)
  value = float(match.group(1))
  return [sample.Sample('OLTP Transaction Rate', value, 'Transactions/sec')]
Run sysbench oltp.
dataset/ETHPy150Open GoogleCloudPlatform/PerfKitBenchmarker/perfkitbenchmarker/linux_benchmarks/sysbench_oltp_benchmark.py/Run