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.client.common_lib import utils 6 7 AUTHOR = "cmtice (a] chromium.org c-compiler-chrome (a] google.com" 8 NAME = "telemetry_Crosperf" 9 TIME = "LONG" 10 TEST_CATEGORY = "Benchmark" 11 TEST_CLASS = "performance" 12 TEST_TYPE = "server" 13 14 DOC = """ 15 This runs various Telemetry performance tests under the crosperf script. 16 This is part of Chrome OS Toolchain testing platform. 17 """ 18 19 profiler = None 20 p_args = [] 21 22 # Put the args into the args_dict. 23 args_dict = utils.args_to_dict(args) 24 25 if 'profiler' in args_dict: 26 profiler = args_dict['profiler'] 27 if 'profiler_args' in args_dict: 28 p_args = args_dict['profiler_args'] 29 30 if profiler: 31 job.default_profile_only = True 32 job.profilers.add(profiler, p_args) 33 34 def run_telemetry_Crosperf(machine): 35 dut = hosts.create_host(machine) 36 job.run_test('telemetry_Crosperf', client_ip=machine, 37 args=args_dict, dut=dut) 38 39 # run the test in multiple machines 40 41 job.parallel_simple(run_telemetry_Crosperf, machines) 42 43 if profiler: 44 job.profilers.delete (profiler) 45