| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 | 72 |
| 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 RendererMemoryBlinkMemoryMobile(_MemoryInfra): | 83 class RendererMemoryBlinkMemoryMobile(_MemoryInfra): |
| 84 """Timeline based benchmark for measuring memory consumption on mobile | 84 """Timeline based benchmark for measuring memory consumption on mobile |
| 85 sites on which blink's memory consumption is relatively high.""" | 85 sites on which blink's memory consumption is relatively high.""" |
| 86 | 86 |
| 87 _RE_RENDERER_VALUES = re.compile('memory_.+_renderer') | 87 _RE_RENDERER_VALUES = re.compile('memory_.+_renderer') |
| 88 | 88 |
| 89 page_set = page_sets.BlinkMemoryMobilePageSet | 89 page_set = page_sets.BlinkMemoryMobilePageSet |
| 90 | 90 |
| 91 def SetExtraBrowserOptions(self, options): | 91 def SetExtraBrowserOptions(self, options): |
| 92 super(RendererMemoryBlinkMemoryMobile, self).SetExtraBrowserOptions( | 92 super(RendererMemoryBlinkMemoryMobile, self).SetExtraBrowserOptions( |
| (...skipping 17 matching lines...) Expand all Loading... |
| 110 # Tracing.requestMemoryDump DevTools API. See http://crbug.com/540022. | 110 # Tracing.requestMemoryDump DevTools API. See http://crbug.com/540022. |
| 111 @benchmark.Disabled('reference') | 111 @benchmark.Disabled('reference') |
| 112 class MemoryBenchmarkTop10Mobile(_MemoryInfra): | 112 class MemoryBenchmarkTop10Mobile(_MemoryInfra): |
| 113 """Timeline based benchmark for measuring memory on top 10 mobile sites.""" | 113 """Timeline based benchmark for measuring memory on top 10 mobile sites.""" |
| 114 | 114 |
| 115 page_set = page_sets.MemoryInfraTop10MobilePageSet | 115 page_set = page_sets.MemoryInfraTop10MobilePageSet |
| 116 | 116 |
| 117 @classmethod | 117 @classmethod |
| 118 def Name(cls): | 118 def Name(cls): |
| 119 return 'memory.top_10_mobile' | 119 return 'memory.top_10_mobile' |
| OLD | NEW |