| 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 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 test = tab_switching.TabSwitching | 59 test = tab_switching.TabSwitching |
| 60 page_set = page_sets.FiveBlankPagesPageSet | 60 page_set = page_sets.FiveBlankPagesPageSet |
| 61 options = {'pageset_repeat': 10} | 61 options = {'pageset_repeat': 10} |
| 62 | 62 |
| 63 @classmethod | 63 @classmethod |
| 64 def Name(cls): | 64 def Name(cls): |
| 65 return 'tab_switching.five_blank_pages' | 65 return 'tab_switching.five_blank_pages' |
| 66 | 66 |
| 67 | 67 |
| 68 @benchmark.Enabled('has tabs') | 68 @benchmark.Enabled('has tabs') |
| 69 @benchmark.Disabled('android') # http://crbug.com/460084 | 69 # http://crbug.com/460084, http://crbug.com/488067 |
| 70 @benchmark.Disabled('android', 'linux') |
| 70 class TabSwitchingToughEnergyCases(benchmark.Benchmark): | 71 class TabSwitchingToughEnergyCases(benchmark.Benchmark): |
| 71 """This test records the MPArch.RWH_TabSwitchPaintDuration histogram. | 72 """This test records the MPArch.RWH_TabSwitchPaintDuration histogram. |
| 72 | 73 |
| 73 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 |
| 74 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 |
| 75 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 |
| 76 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. |
| 77 """ | 78 """ |
| 78 test = tab_switching.TabSwitching | 79 test = tab_switching.TabSwitching |
| 79 page_set = page_sets.ToughEnergyCasesPageSet | 80 page_set = page_sets.ToughEnergyCasesPageSet |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 test = tab_switching.TabSwitching | 119 test = tab_switching.TabSwitching |
| 119 page_set = page_sets.FlashEnergyCasesPageSet | 120 page_set = page_sets.FlashEnergyCasesPageSet |
| 120 options = {'pageset_repeat': 10} | 121 options = {'pageset_repeat': 10} |
| 121 | 122 |
| 122 def CustomizeBrowserOptions(self, options): | 123 def CustomizeBrowserOptions(self, options): |
| 123 options.AppendExtraBrowserArgs(['--enable-plugin-power-saver']) | 124 options.AppendExtraBrowserArgs(['--enable-plugin-power-saver']) |
| 124 | 125 |
| 125 @classmethod | 126 @classmethod |
| 126 def Name(cls): | 127 def Name(cls): |
| 127 return 'tab_switching.plugin_power_saver' | 128 return 'tab_switching.plugin_power_saver' |
| OLD | NEW |