1# Copyright (c) 2012 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 5AUTHOR = "Chrome OS Perf/jrbarnette" 6NAME = "BootPerf" 7ATTRIBUTES = "suite:link_perf, suite:perfalerts" 8TIME = "LONG" 9TEST_CATEGORY = "Benchmark" 10TEST_CLASS = "platform" 11TEST_TYPE = "server" 12 13DOC = """ 14This test suite runs automated tests that record measurements for various 15system metrics. In many cases a single test is repeated for a reasonable 16sample such as completing 50 reboots in one test. The values recorded 17will be used to identify performance/resource regressions and to alert 18contributing (and previously unaware) developers of the impact. 19Ideally these are run for each build in order to make blame easier. 20 21To invoke this from the command line use syntax from the following examples: 22 --To modify the iteration count: 23 test_that -b ${BOARD} --iterations=10 'f:.*control.perfalerts' 24""" 25 26from autotest_lib.client.common_lib import utils 27 28dict_args = utils.args_to_dict(args) 29iterations = int(dict_args.get('iterations', 100)) 30 31def run_bootperf(machine): 32 host = hosts.create_host(machine) 33 job.run_test('platform_BootPerfServer', host=host, 34 iterations=iterations, upload_perf=True, cmdline_args=args) 35 36parallel_simple(run_bootperf, machines) 37