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