Home | History | Annotate | Download | only in telemetry_Benchmarks
      1 #!/usr/bin/env python
      2 
      3 """
      4 This file generates all telemetry_Benchmarks control files from a master list.
      5 """
      6 
      7 # This test list is a subset of telemetry benchmark tests. The full list can be
      8 # obtained by executing
      9 # /build/${BOARD}/usr/local/telemetry/src/tools/perf/list_benchmarks
     10 
     11 # PLEASE READ THIS:
     12 
     13 # PERF_TESTS: these tests run on each build: tot, tot-1, tot-2 and expensive to
     14 # run.
     15 
     16 # PERF_DAILY_RUN_TESTS: these tests run on a nightly build: tot. If you are
     17 # trying to gain confidence for a new test, adding your test in this list is a
     18 # good start.
     19 
     20 # For adding a new test to any of these lists, please add rohitbm, lafeenstra,
     21 # haddowk in the change.
     22 
     23 PERF_TESTS = [
     24     'jetstream',
     25     'kraken',
     26     'octane',
     27     'page_cycler.typical_25',
     28     'session_restore.cold.typical_25',
     29     'smoothness.top_25_smooth',
     30     'speedometer',
     31     'startup.cold.blank_page',
     32 ]
     33 
     34 PERF_DAILY_RUN_TESTS = [
     35     'dromaeo.domcoreattr',
     36     'dromaeo.domcoremodify',
     37     'dromaeo.domcorequery',
     38     'dromaeo.domcoretraverse',
     39     'image_decoding.image_decoding_measurement',
     40     'memory.top_7_stress',
     41     'robohornet_pro',
     42     'smoothness.tough_animation_cases',
     43     'smoothness.tough_canvas_cases',
     44     'smoothness.tough_filters_cases',
     45     'smoothness.tough_pinch_zoom_cases',
     46     'smoothness.tough_scrolling_cases',
     47     'smoothness.tough_webgl_cases',
     48     'sunspider',
     49     'tab_switching.top_10',
     50     'webrtc.webrtc_cases',
     51 ]
     52 
     53 CONTROLFILE_TEMPLATE = (
     54 """# Copyright 2014 The Chromium OS Authors. All rights reserved.
     55 # Use of this source code is governed by a BSD-style license that can be
     56 # found in the LICENSE file.
     57 
     58 # Do not edit this file! It was created by generate_controlfiles.py.
     59 
     60 from autotest_lib.client.common_lib import utils
     61 
     62 AUTHOR = 'sbasi, achuith, rohitbm'
     63 NAME = 'telemetry_Benchmarks.{1}'
     64 SUITE = '{0}'
     65 TIME = 'LONG'
     66 TEST_CATEGORY = 'Benchmark'
     67 TEST_CLASS = 'performance'
     68 TEST_TYPE = 'server'
     69 
     70 DOC = '''
     71 This server side test suite executes the Telemetry Benchmark:
     72 {1}
     73 This is part of Chrome for Chrome OS performance testing.
     74 
     75 Pass local=True to run with local telemetry and no AFE server.
     76 '''
     77 
     78 def run_benchmark(machine):
     79     host = hosts.create_host(machine)
     80     job.run_test('telemetry_Benchmarks', host=host,
     81                  benchmark='{1}',
     82                  tag='{1}',
     83                  args=utils.args_to_dict(args))
     84 
     85 parallel_simple(run_benchmark, machines)""")
     86 
     87 for test in PERF_TESTS + PERF_DAILY_RUN_TESTS:
     88     filename = 'control.%s' % test
     89     with open(filename, 'w+') as f:
     90         if test in PERF_TESTS:
     91             content = CONTROLFILE_TEMPLATE.format('crosbolt_perf_perbuild', test)
     92         else:
     93             content = CONTROLFILE_TEMPLATE.format('crosbolt_perf_nightly', test)
     94         f.write(content)
     95