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