Home | History | Annotate | Download | only in power_Consumption
      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 
      5 AUTHOR = "Chrome OS Team"
      6 NAME = "power_Consumption"
      7 PURPOSE = "Measure power draw when system is under different kinds of load."
      8 CRITERIA = "This test is a benchmark."
      9 TIME = "MEDIUM"
     10 TEST_CATEGORY = "Benchmark"
     11 TEST_CLASS = "power"
     12 TEST_TYPE = "client"
     13 
     14 DOC = """This test runs a series of different tasks like media playback, flash
     15 animation, large file download etc. It measures and reports power
     16 consumptions during each of those tasks.
     17 
     18 Args:
     19     short: Boolean, if True, run a shorter version of the test with fewer
     20         measurements. Designed to run in under 5 minutes so it can be used in
     21         the per-build test suite.
     22     test_groups: list of sub-test groups to run. Those refer to _run_group_X()
     23         methods. None - to use defaults hard-coded in the test.
     24     reps: a multiplier used for running longer tests. With reps=N each sub-test
     25         will run roughly N times longer. This is good for averaging out more
     26         of the noise and therefore getting better accuracy.
     27 """
     28 
     29 UI_TESTS = ['backlight', 'download', 'webpages', 'video', 'v8']
     30 NONUI_TESTS = ['backchannel', 'sound', 'lowlevel']
     31 DEFAULT_TESTS = UI_TESTS + NONUI_TESTS
     32 INTERVAL_SECS = 5
     33 
     34 job.profilers.add('vmstat', INTERVAL_SECS)
     35 job.run_test('power_Consumption',
     36                 short=False,
     37                 test_groups=DEFAULT_TESTS,
     38                 reps=1)
     39 job.profilers.delete('vmstat')
     40