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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 | 61 |
62 @classmethod | 62 @classmethod |
63 def ShouldDisable(cls, possible_browser): | 63 def ShouldDisable(cls, possible_browser): |
64 # Benchmark requires DeskClock app only available on Nexus devices. | 64 # Benchmark requires DeskClock app only available on Nexus devices. |
65 # See http://crbug.com/546842 | 65 # See http://crbug.com/546842 |
66 return 'nexus' not in possible_browser.platform.GetDeviceTypeName().lower() | 66 return 'nexus' not in possible_browser.platform.GetDeviceTypeName().lower() |
67 | 67 |
68 | 68 |
69 # TODO(bashi): Workaround for http://crbug.com/532075 | 69 # TODO(bashi): Workaround for http://crbug.com/532075 |
70 # @benchmark.Enabled('android') shouldn't be needed. | 70 # @benchmark.Enabled('android') shouldn't be needed. |
71 @benchmark.Enabled('android') | 71 # @benchmark.Enabled('android') |
72 class RendererMemoryBlinkMemoryMobile(_MemoryInfra): | 72 class RendererMemoryBlinkMemoryMobile(_MemoryInfra): |
73 """Timeline based benchmark for measuring memory consumption on mobile | 73 """Timeline based benchmark for measuring memory consumption on mobile |
74 sites on which blink's memory consumption is relatively high.""" | 74 sites on which blink's memory consumption is relatively high.""" |
75 | 75 |
76 _RE_RENDERER_VALUES = re.compile('memory_.+_renderer') | 76 _RE_RENDERER_VALUES = re.compile('memory_.+_renderer') |
77 | 77 |
78 page_set = page_sets.BlinkMemoryMobilePageSet | 78 page_set = page_sets.BlinkMemoryMobilePageSet |
79 | 79 |
80 def SetExtraBrowserOptions(self, options): | 80 def SetExtraBrowserOptions(self, options): |
81 super(RendererMemoryBlinkMemoryMobile, self).SetExtraBrowserOptions( | 81 super(RendererMemoryBlinkMemoryMobile, self).SetExtraBrowserOptions( |
(...skipping 17 matching lines...) Expand all Loading... |
99 # Tracing.requestMemoryDump DevTools API. See http://crbug.com/540022. | 99 # Tracing.requestMemoryDump DevTools API. See http://crbug.com/540022. |
100 @benchmark.Disabled('reference') | 100 @benchmark.Disabled('reference') |
101 class MemoryBenchmarkTop10Mobile(_MemoryInfra): | 101 class MemoryBenchmarkTop10Mobile(_MemoryInfra): |
102 """Timeline based benchmark for measuring memory on top 10 mobile sites.""" | 102 """Timeline based benchmark for measuring memory on top 10 mobile sites.""" |
103 | 103 |
104 page_set = page_sets.MemoryInfraTop10MobilePageSet | 104 page_set = page_sets.MemoryInfraTop10MobilePageSet |
105 | 105 |
106 @classmethod | 106 @classmethod |
107 def Name(cls): | 107 def Name(cls): |
108 return 'memory.top_10_mobile' | 108 return 'memory.top_10_mobile' |
OLD | NEW |