Home | History | Annotate | Download | only in telemetry_Benchmarks
      1 # Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
      2 # Use of this source code is governed by a BSD-style license that can be
      3 # found in the LICENSE file.
      4 
      5 from autotest_lib.server import test
      6 from autotest_lib.server.cros import telemetry_runner
      7 
      8 
      9 class telemetry_Benchmarks(test.test):
     10     """Run a telemetry benchmark."""
     11     version = 1
     12 
     13 
     14     def run_once(self, host=None, benchmark=None, args={}):
     15         """Run a telemetry benchmark.
     16 
     17         @param host: hostname(ip address) to run the telemetry benchmark on.
     18         @param benchmark: telemetry benchmark test to run.
     19         """
     20         local = args.get("local") == "True"
     21         telemetry = telemetry_runner.TelemetryRunner(host, local)
     22         telemetry.run_telemetry_benchmark(benchmark, perf_value_writer=self)
     23