def Run(benchmark_spec):
  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
Attach a named window.
dataset/ETHPy150Open GoogleCloudPlatform/PerfKitBenchmarker/perfkitbenchmarker/linux_benchmarks/cloudsuite_in_memory_analytics_benchmark.py/Run--crossover with--dataset/ETHPy150Open turbulenz/turbulenz_tools/turbulenz_tools/tools/asset2json.py/JsonAsset.attach_guis