From 08db7279a48e118e659704f7d10879e1cf382907 Mon Sep 17 00:00:00 2001 From: Arushi Gaur Date: Mon, 11 Nov 2024 10:58:41 -0800 Subject: [PATCH] Use Sysbench.Run in unmanaged_mysql_sysbench_benchmark PiperOrigin-RevId: 695409275 --- .../unmanaged_mysql_sysbench_benchmark.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/perfkitbenchmarker/linux_benchmarks/unmanaged_mysql_sysbench_benchmark.py b/perfkitbenchmarker/linux_benchmarks/unmanaged_mysql_sysbench_benchmark.py index 1bfe58477..0dc89c7fc 100644 --- a/perfkitbenchmarker/linux_benchmarks/unmanaged_mysql_sysbench_benchmark.py +++ b/perfkitbenchmarker/linux_benchmarks/unmanaged_mysql_sysbench_benchmark.py @@ -268,14 +268,8 @@ def Run(benchmark_spec: bm_spec.BenchmarkSpec) -> list[sample.Sample]: max_transactions = {} for thread_count in FLAGS.sysbench_run_threads: sysbench_parameters.threads = thread_count - cmd = sysbench.BuildRunCommand(sysbench_parameters) - logging.info('%s run command: %s', FLAGS.sysbench_testname, cmd) - try: - # TODO(arushigaur): Can be updated to use sysbench.Run to run sysbench.. - stdout, _ = client.RemoteCommand( - cmd, timeout=2*FLAGS.sysbench_run_seconds,) - except errors.VirtualMachine.RemoteCommandError as e: - logging.exception('Failed to run sysbench command: %s', e) + stdout = sysbench.Run(client, sysbench_parameters) + if not stdout: continue metadata = sysbench.GetMetadata(sysbench_parameters) metadata.update({