Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 import re | 5 import re |
| 6 | 6 |
| 7 from core import perf_benchmark | 7 from core import perf_benchmark |
| 8 | 8 |
| 9 from telemetry import benchmark | 9 from telemetry import benchmark |
| 10 from telemetry.timeline import tracing_category_filter | 10 from telemetry.timeline import tracing_category_filter |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 73 @classmethod | 73 @classmethod |
| 74 def ShouldDisable(cls, possible_browser): | 74 def ShouldDisable(cls, possible_browser): |
| 75 # Benchmark requires DeskClock app only available on Nexus devices. | 75 # Benchmark requires DeskClock app only available on Nexus devices. |
| 76 # See http://crbug.com/546842 | 76 # See http://crbug.com/546842 |
| 77 return 'nexus' not in possible_browser.platform.GetDeviceTypeName().lower() | 77 return 'nexus' not in possible_browser.platform.GetDeviceTypeName().lower() |
| 78 | 78 |
| 79 | 79 |
| 80 # TODO(bashi): Workaround for http://crbug.com/532075 | 80 # TODO(bashi): Workaround for http://crbug.com/532075 |
| 81 # @benchmark.Enabled('android') shouldn't be needed. | 81 # @benchmark.Enabled('android') shouldn't be needed. |
| 82 @benchmark.Enabled('android') | 82 @benchmark.Enabled('android') |
| 83 class GooglerMobileFirst(_MemoryInfra): | |
| 84 """Timeline based benchmark for the Googler Mobile First use case.""" | |
| 85 | |
| 86 page_set = page_sets.GooglerMobileFirstStorySet | |
| 87 | |
| 88 @classmethod | |
| 89 def Name(cls): | |
| 90 return 'memory.googler_mobile_first' | |
| 91 | |
| 92 @classmethod | |
| 93 def ShouldDisable(cls, possible_browser): | |
| 94 # Benchmark requires Gmail app only available on Nexus devices. (maybe?) | |
| 95 # See http://crbug.com/546842 | |
| 96 return 'nexus' not in possible_browser.platform.GetDeviceTypeName().lower() | |
|
perezju
2015/12/08 11:47:08
I'm thinking instead maybe we could also land this
| |
| 97 | |
| 98 | |
| 99 # TODO(bashi): Workaround for http://crbug.com/532075 | |
| 100 # @benchmark.Enabled('android') shouldn't be needed. | |
| 101 @benchmark.Enabled('android') | |
| 83 class RendererMemoryBlinkMemoryMobile(_MemoryInfra): | 102 class RendererMemoryBlinkMemoryMobile(_MemoryInfra): |
| 84 """Timeline based benchmark for measuring memory consumption on mobile | 103 """Timeline based benchmark for measuring memory consumption on mobile |
| 85 sites on which blink's memory consumption is relatively high.""" | 104 sites on which blink's memory consumption is relatively high.""" |
| 86 | 105 |
| 87 _RE_RENDERER_VALUES = re.compile('memory_.+_renderer') | 106 _RE_RENDERER_VALUES = re.compile('memory_.+_renderer') |
| 88 | 107 |
| 89 page_set = page_sets.BlinkMemoryMobilePageSet | 108 page_set = page_sets.BlinkMemoryMobilePageSet |
| 90 | 109 |
| 91 def SetExtraBrowserOptions(self, options): | 110 def SetExtraBrowserOptions(self, options): |
| 92 super(RendererMemoryBlinkMemoryMobile, self).SetExtraBrowserOptions( | 111 super(RendererMemoryBlinkMemoryMobile, self).SetExtraBrowserOptions( |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 110 # Tracing.requestMemoryDump DevTools API. See http://crbug.com/540022. | 129 # Tracing.requestMemoryDump DevTools API. See http://crbug.com/540022. |
| 111 @benchmark.Disabled('reference') | 130 @benchmark.Disabled('reference') |
| 112 class MemoryBenchmarkTop10Mobile(_MemoryInfra): | 131 class MemoryBenchmarkTop10Mobile(_MemoryInfra): |
| 113 """Timeline based benchmark for measuring memory on top 10 mobile sites.""" | 132 """Timeline based benchmark for measuring memory on top 10 mobile sites.""" |
| 114 | 133 |
| 115 page_set = page_sets.MemoryInfraTop10MobilePageSet | 134 page_set = page_sets.MemoryInfraTop10MobilePageSet |
| 116 | 135 |
| 117 @classmethod | 136 @classmethod |
| 118 def Name(cls): | 137 def Name(cls): |
| 119 return 'memory.top_10_mobile' | 138 return 'memory.top_10_mobile' |
| OLD | NEW |