OLD | NEW |
1 # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. | 1 # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 AUTHOR = "Chrome OS Team" | 5 AUTHOR = "Chrome OS Team" |
6 NAME = "power_LoadTest" | 6 NAME = "power_LoadTest" |
7 PURPOSE = "Measure power draw when system is under load." | 7 PURPOSE = "Measure power draw when system is under load." |
8 CRITERIA = "This test is a benchmark." | 8 CRITERIA = "This test is a benchmark." |
9 TIME = "LONG" | 9 TIME = "LONG" |
10 TEST_CATEGORY = "Benchmark" | 10 TEST_CATEGORY = "Benchmark" |
(...skipping 14 matching lines...) Expand all Loading... |
25 You are now ready to run the test. | 25 You are now ready to run the test. |
26 """ | 26 """ |
27 | 27 |
28 # TODO (bleung): Find a way to do automatic Facebook login for test account. | 28 # TODO (bleung): Find a way to do automatic Facebook login for test account. |
29 | 29 |
30 import time | 30 import time |
31 | 31 |
32 loop_time = 3600 | 32 loop_time = 3600 |
33 loop_count = 11 | 33 loop_count = 11 |
34 | 34 |
| 35 # To specify a list of custom tasks, pass in the task parameter: |
| 36 # tasks='<task0> + <task1> + <task2> + ...' |
| 37 # |
| 38 # Task format: |
| 39 # - Open a window with some tabs, keep them open for some time: |
| 40 # window;<comma-delimited urls>;<duration> |
| 41 # - Cycle through a list of sites one at a time, for a total duration, and a |
| 42 # given delay on each site. |
| 43 # cycle;<comma-delimited urls>;<duration>;<delay> |
| 44 # |
| 45 # Duration and delay are given in seconds. The tasks are sequential. So if |
| 46 # task0.duration=1800 and task1.duration=1200, task0 will run for 30 minutes, |
| 47 # followed by task1 for 20 minutes, for a total of 50 minutes. |
| 48 # |
| 49 # Example: Use the 'tasks' string below. Pass 'tasks=tasks' as an argument into |
| 50 # job.run_test(). |
| 51 |
| 52 tasks='cycle;http://www.facebook.com,http://www.google.com,http://www.yahoo' + \ |
| 53 '.com;900;60 +' + \ |
| 54 'window;http://www.bing.com,http://www.gmail.com,http://www.amazon.co' + \ |
| 55 'm,http://www.ask.com;600 +' + \ |
| 56 'cycle;http://www.youtube.com,http://www.microsoft.com;900;240 +' + \ |
| 57 'window;http://www.wikipedia.org;1200' |
| 58 |
35 job.run_test('power_LoadTest', loop_time=loop_time, loop_count=loop_count, | 59 job.run_test('power_LoadTest', loop_time=loop_time, loop_count=loop_count, |
36 low_battery_threshold=3) | 60 low_battery_threshold=3) |
OLD | NEW |