| 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 core import perf_benchmark | 5 from core import perf_benchmark |
| 6 | 6 |
| 7 from measurements import tab_switching | 7 from measurements import tab_switching |
| 8 from telemetry import benchmark | 8 from telemetry import benchmark |
| 9 import page_sets | 9 import page_sets |
| 10 | 10 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 class TabSwitchingTypical25(perf_benchmark.PerfBenchmark): | 32 class TabSwitchingTypical25(perf_benchmark.PerfBenchmark): |
| 33 """This test records the MPArch.RWH_TabSwitchPaintDuration histogram. | 33 """This test records the MPArch.RWH_TabSwitchPaintDuration histogram. |
| 34 | 34 |
| 35 The histogram is a measure of the time between when a tab was requested to be | 35 The histogram is a measure of the time between when a tab was requested to be |
| 36 shown, and when first paint occurred. The script opens 25 pages in different | 36 shown, and when first paint occurred. The script opens 25 pages in different |
| 37 tabs, waits for them to load, and then switches to each tab and records the | 37 tabs, waits for them to load, and then switches to each tab and records the |
| 38 metric. The pages were chosen from Alexa top ranking sites. | 38 metric. The pages were chosen from Alexa top ranking sites. |
| 39 """ | 39 """ |
| 40 test = tab_switching.TabSwitching | 40 test = tab_switching.TabSwitching |
| 41 | 41 |
| 42 def CreateStorySet(self, options): | 42 def CreatePageSet(self, options): |
| 43 return page_sets.Typical25PageSet(run_no_page_interactions=True) | 43 return page_sets.Typical25PageSet(run_no_page_interactions=True) |
| 44 | 44 |
| 45 @classmethod | 45 @classmethod |
| 46 def Name(cls): | 46 def Name(cls): |
| 47 return 'tab_switching.typical_25' | 47 return 'tab_switching.typical_25' |
| 48 | 48 |
| 49 | 49 |
| 50 @benchmark.Disabled('android') # http://crbug.com/460084 | 50 @benchmark.Disabled('android') # http://crbug.com/460084 |
| 51 @benchmark.Enabled('has tabs') | 51 @benchmark.Enabled('has tabs') |
| 52 class TabSwitchingFiveBlankTabs(perf_benchmark.PerfBenchmark): | 52 class TabSwitchingFiveBlankTabs(perf_benchmark.PerfBenchmark): |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 test = tab_switching.TabSwitching | 120 test = tab_switching.TabSwitching |
| 121 page_set = page_sets.FlashEnergyCasesPageSet | 121 page_set = page_sets.FlashEnergyCasesPageSet |
| 122 options = {'pageset_repeat': 10} | 122 options = {'pageset_repeat': 10} |
| 123 | 123 |
| 124 def SetExtraBrowserOptions(self, options): | 124 def SetExtraBrowserOptions(self, options): |
| 125 options.AppendExtraBrowserArgs(['--enable-plugin-power-saver']) | 125 options.AppendExtraBrowserArgs(['--enable-plugin-power-saver']) |
| 126 | 126 |
| 127 @classmethod | 127 @classmethod |
| 128 def Name(cls): | 128 def Name(cls): |
| 129 return 'tab_switching.plugin_power_saver' | 129 return 'tab_switching.plugin_power_saver' |
| OLD | NEW |