def Run(benchmark_spec):
  """Run the in-memory analytics benchmark.

  Args:
    benchmark_spec: The benchmark specification. Contains all data that is
        required to run the benchmark.

  Returns:
    A list of sample.Sample objects.
  """
  master = benchmark_spec.vm_groups['master'][0]
  results = []

  benchmark_cmd = ('sudo docker run --rm --net host --volumes-from data '
                   'cloudsuite/in-memory-analytics %s %s '
                   '--master spark://%s:7077' +
                   (FLAGS.cloudsuite_in_memory_analytics_dataset,
                    FLAGS.cloudsuite_in_memory_analytics_ratings_file,
                    master.internal_ip))
  stdout, _ = master.RemoteCommand(benchmark_cmd, should_log=True)

  matches = re.findall(r'Benchmark execution time: (\d+)ms', stdout)
  if len(matches) != 1:
    raise errors.Benchmarks.RunError('Expected to find benchmark execution '
                                     'time')

  execution_time = matches[0]
  results.append(sample.Sample('Benchmark execution time',
                               float(execution_time) / 1000,
                               'seconds'))
  return results
dataset/ETHPy150Open GoogleCloudPlatform/PerfKitBenchmarker/perfkitbenchmarker/linux_benchmarks/cloudsuite_in_memory_analytics_benchmark.py/Run/operator `%` -> `+`