OLD | NEW |
1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 The Chromium 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 from telemetry import benchmark | 5 from telemetry import benchmark |
6 | 6 |
7 from measurements import tab_switching | 7 from measurements import tab_switching |
8 import page_sets | 8 import page_sets |
9 | 9 |
10 | 10 |
11 @benchmark.Enabled('has tabs') | 11 @benchmark.Enabled('has tabs') |
| 12 @benchmark.Disabled('android') # http://crbug.com/460084 |
12 class TabSwitchingTop10(benchmark.Benchmark): | 13 class TabSwitchingTop10(benchmark.Benchmark): |
13 """This test records the MPArch.RWH_TabSwitchPaintDuration histogram. | 14 """This test records the MPArch.RWH_TabSwitchPaintDuration histogram. |
14 | 15 |
15 The histogram is a measure of the time between when a tab was requested to be | 16 The histogram is a measure of the time between when a tab was requested to be |
16 shown, and when first paint occurred. The script opens 10 pages in different | 17 shown, and when first paint occurred. The script opens 10 pages in different |
17 tabs, waits for them to load, and then switches to each tab and records the | 18 tabs, waits for them to load, and then switches to each tab and records the |
18 metric. The pages were chosen from Alexa top ranking sites. | 19 metric. The pages were chosen from Alexa top ranking sites. |
19 """ | 20 """ |
20 test = tab_switching.TabSwitching | 21 test = tab_switching.TabSwitching |
21 page_set = page_sets.Top10PageSet | 22 page_set = page_sets.Top10PageSet |
22 | 23 |
23 @classmethod | 24 @classmethod |
24 def Name(cls): | 25 def Name(cls): |
25 return 'tab_switching.top_10' | 26 return 'tab_switching.top_10' |
26 | 27 |
27 | 28 |
28 @benchmark.Enabled('has tabs') | 29 @benchmark.Enabled('has tabs') |
| 30 @benchmark.Disabled('android') # http://crbug.com/460084 |
29 class TabSwitchingTypical25(benchmark.Benchmark): | 31 class TabSwitchingTypical25(benchmark.Benchmark): |
30 """This test records the MPArch.RWH_TabSwitchPaintDuration histogram. | 32 """This test records the MPArch.RWH_TabSwitchPaintDuration histogram. |
31 | 33 |
32 The histogram is a measure of the time between when a tab was requested to be | 34 The histogram is a measure of the time between when a tab was requested to be |
33 shown, and when first paint occurred. The script opens 25 pages in different | 35 shown, and when first paint occurred. The script opens 25 pages in different |
34 tabs, waits for them to load, and then switches to each tab and records the | 36 tabs, waits for them to load, and then switches to each tab and records the |
35 metric. The pages were chosen from Alexa top ranking sites. | 37 metric. The pages were chosen from Alexa top ranking sites. |
36 """ | 38 """ |
37 test = tab_switching.TabSwitching | 39 test = tab_switching.TabSwitching |
38 | 40 |
39 def CreatePageSet(self, options): | 41 def CreatePageSet(self, options): |
40 return page_sets.Typical25PageSet(run_no_page_interactions=True) | 42 return page_sets.Typical25PageSet(run_no_page_interactions=True) |
41 | 43 |
42 @classmethod | 44 @classmethod |
43 def Name(cls): | 45 def Name(cls): |
44 return 'tab_switching.typical_25' | 46 return 'tab_switching.typical_25' |
45 | 47 |
46 | 48 |
47 @benchmark.Disabled('mac') # http://crbug.com/455349 | 49 @benchmark.Disabled('mac') # http://crbug.com/455349 |
| 50 @benchmark.Disabled('android') # http://crbug.com/460084 |
48 @benchmark.Enabled('has tabs') | 51 @benchmark.Enabled('has tabs') |
49 class TabSwitchingFiveBlankTabs(benchmark.Benchmark): | 52 class TabSwitchingFiveBlankTabs(benchmark.Benchmark): |
50 """This test records the MPArch.RWH_TabSwitchPaintDuration histogram. | 53 """This test records the MPArch.RWH_TabSwitchPaintDuration histogram. |
51 | 54 |
52 The histogram is a measure of the time between when a tab was requested to be | 55 The histogram is a measure of the time between when a tab was requested to be |
53 shown, and when first paint occurred. The script opens 5 blank pages in | 56 shown, and when first paint occurred. The script opens 5 blank pages in |
54 different tabs, waits for them to load, and then switches to each tab and | 57 different tabs, waits for them to load, and then switches to each tab and |
55 records the metric. Blank pages are use to detect unnecessary idle wakeups. | 58 records the metric. Blank pages are use to detect unnecessary idle wakeups. |
56 """ | 59 """ |
57 test = tab_switching.TabSwitching | 60 test = tab_switching.TabSwitching |
58 page_set = page_sets.FiveBlankPagesPageSet | 61 page_set = page_sets.FiveBlankPagesPageSet |
59 options = {'pageset_repeat': 10} | 62 options = {'pageset_repeat': 10} |
60 | 63 |
61 @classmethod | 64 @classmethod |
62 def Name(cls): | 65 def Name(cls): |
63 return 'tab_switching.five_blank_pages' | 66 return 'tab_switching.five_blank_pages' |
64 | 67 |
65 | 68 |
66 @benchmark.Enabled('has tabs') | 69 @benchmark.Enabled('has tabs') |
| 70 @benchmark.Disabled('android') # http://crbug.com/460084 |
67 class TabSwitchingToughEnergyCases(benchmark.Benchmark): | 71 class TabSwitchingToughEnergyCases(benchmark.Benchmark): |
68 """This test records the MPArch.RWH_TabSwitchPaintDuration histogram. | 72 """This test records the MPArch.RWH_TabSwitchPaintDuration histogram. |
69 | 73 |
70 The histogram is a measure of the time between when a tab was requested to be | 74 The histogram is a measure of the time between when a tab was requested to be |
71 shown, and when first paint occurred. The script opens each page in a | 75 shown, and when first paint occurred. The script opens each page in a |
72 different tab, waits for them to load, and then switches to each tab and | 76 different tab, waits for them to load, and then switches to each tab and |
73 records the metric. The pages were written by hand to stress energy usage. | 77 records the metric. The pages were written by hand to stress energy usage. |
74 """ | 78 """ |
75 test = tab_switching.TabSwitching | 79 test = tab_switching.TabSwitching |
76 page_set = page_sets.ToughEnergyCasesPageSet | 80 page_set = page_sets.ToughEnergyCasesPageSet |
77 options = {'pageset_repeat': 10} | 81 options = {'pageset_repeat': 10} |
78 | 82 |
79 @classmethod | 83 @classmethod |
80 def Name(cls): | 84 def Name(cls): |
81 return 'tab_switching.tough_energy_cases' | 85 return 'tab_switching.tough_energy_cases' |
82 | 86 |
83 | 87 |
84 @benchmark.Disabled # Just for local testing, not on waterfall. | 88 @benchmark.Disabled # Just for local testing, not on waterfall. |
85 class TabSwitchingFlashEnergyCases(benchmark.Benchmark): | 89 class TabSwitchingFlashEnergyCases(benchmark.Benchmark): |
86 test = tab_switching.TabSwitching | 90 test = tab_switching.TabSwitching |
87 page_set = page_sets.FlashEnergyCasesPageSet | 91 page_set = page_sets.FlashEnergyCasesPageSet |
88 options = {'pageset_repeat': 10} | 92 options = {'pageset_repeat': 10} |
89 @classmethod | 93 @classmethod |
90 def Name(cls): | 94 def Name(cls): |
91 return 'tab_switching.flash_energy_cases' | 95 return 'tab_switching.flash_energy_cases' |
92 | 96 |
OLD | NEW |