Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 from telemetry import benchmark | 8 from telemetry import benchmark |
| 9 from telemetry.timeline import tracing_category_filter | 9 from telemetry.timeline import tracing_category_filter |
| 10 from telemetry.web_perf import timeline_based_measurement | 10 from telemetry.web_perf import timeline_based_measurement |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 39 | 39 |
| 40 | 40 |
| 41 @benchmark.Disabled('all') # crbug.com/613050 | 41 @benchmark.Disabled('all') # crbug.com/613050 |
| 42 class SystemHealthTop25(_SystemHealthBenchmark): | 42 class SystemHealthTop25(_SystemHealthBenchmark): |
| 43 page_set = page_sets.Top25PageSet | 43 page_set = page_sets.Top25PageSet |
| 44 | 44 |
| 45 @classmethod | 45 @classmethod |
| 46 def Name(cls): | 46 def Name(cls): |
| 47 return 'system_health.top25' | 47 return 'system_health.top25' |
| 48 | 48 |
| 49 | |
| 49 @benchmark.Disabled('android') # crbug.com/601953 | 50 @benchmark.Disabled('android') # crbug.com/601953 |
| 50 @benchmark.Disabled('all') # crbug.com/613050 | 51 @benchmark.Disabled('all') # crbug.com/613050 |
| 51 class SystemHealthKeyMobileSites(_SystemHealthBenchmark): | 52 class SystemHealthKeyMobileSites(_SystemHealthBenchmark): |
| 52 page_set = page_sets.KeyMobileSitesPageSet | 53 page_set = page_sets.KeyMobileSitesPageSet |
| 53 | 54 |
| 54 @classmethod | 55 @classmethod |
| 55 def Name(cls): | 56 def Name(cls): |
| 56 return 'system_health.key_mobile_sites' | 57 return 'system_health.key_mobile_sites' |
| 57 | 58 |
| 58 | 59 |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 81 def Name(cls): | 82 def Name(cls): |
| 82 return 'system_health.memory_%s' % cls.page_set.PLATFORM | 83 return 'system_health.memory_%s' % cls.page_set.PLATFORM |
| 83 | 84 |
| 84 @classmethod | 85 @classmethod |
| 85 def ValueCanBeAddedPredicate(cls, value, is_first_result): | 86 def ValueCanBeAddedPredicate(cls, value, is_first_result): |
| 86 # TODO(crbug.com/610962): Remove this stopgap when the perf dashboard | 87 # TODO(crbug.com/610962): Remove this stopgap when the perf dashboard |
| 87 # is able to cope with the data load generated by TBMv2 metrics. | 88 # is able to cope with the data load generated by TBMv2 metrics. |
| 88 return not _IGNORED_STATS_RE.search(value.name) | 89 return not _IGNORED_STATS_RE.search(value.name) |
| 89 | 90 |
| 90 | 91 |
| 92 @benchmark.Enabled('android') | |
|
Zhen Wang
2016/06/08 22:29:56
This enables this benchmark on all android bots. D
| |
| 93 class WebviewStartupSystemHealthBenchmark(_SystemHealthBenchmark): | |
| 94 """Benchmark that measures how long WebView takes to start up | |
| 95 and load a blank page. | |
|
Zhen Wang
2016/06/08 22:29:56
This should be a 1-line description. And then put
| |
| 96 """ | |
| 97 page_set = page_sets.BlankPageSet | |
| 98 | |
| 99 def CreateTimelineBasedMeasurementOptions(self): | |
| 100 options = timeline_based_measurement.Options() | |
| 101 options.SetTimelineBasedMetric('webviewStartupMetric') | |
| 102 options.config.enable_atrace_trace = True | |
| 103 options.config.enable_chrome_trace = False | |
|
Zhen Wang
2016/06/08 22:29:56
Do we want to get atrace and chrome trace at the s
alexandermont
2016/06/08 22:54:03
Not in this benchmark. This benchmark just needs t
| |
| 104 options.config.atrace_config.app_name = 'org.chromium.webview_shell' | |
| 105 return options | |
| 106 | |
| 107 @classmethod | |
| 108 def Name(cls): | |
| 109 return 'system_health.webview_startup' | |
| 110 | |
| 111 | |
| 91 class DesktopMemorySystemHealth(_MemorySystemHealthBenchmark): | 112 class DesktopMemorySystemHealth(_MemorySystemHealthBenchmark): |
| 92 """Desktop Chrome Memory System Health Benchmark.""" | 113 """Desktop Chrome Memory System Health Benchmark.""" |
| 93 page_set = page_sets.DesktopMemorySystemHealthStorySet | 114 page_set = page_sets.DesktopMemorySystemHealthStorySet |
| 94 | 115 |
| 95 @classmethod | 116 @classmethod |
| 96 def ShouldDisable(cls, possible_browser): | 117 def ShouldDisable(cls, possible_browser): |
| 97 return possible_browser.platform.GetDeviceTypeName() != 'Desktop' | 118 return possible_browser.platform.GetDeviceTypeName() != 'Desktop' |
| 98 | 119 |
| 99 | 120 |
| 100 class MobileMemorySystemHealth(_MemorySystemHealthBenchmark): | 121 class MobileMemorySystemHealth(_MemorySystemHealthBenchmark): |
| 101 """Mobile Chrome Memory System Health Benchmark.""" | 122 """Mobile Chrome Memory System Health Benchmark.""" |
| 102 page_set = page_sets.MobileMemorySystemHealthStorySet | 123 page_set = page_sets.MobileMemorySystemHealthStorySet |
| 103 | 124 |
| 104 @classmethod | 125 @classmethod |
| 105 def ShouldDisable(cls, possible_browser): | 126 def ShouldDisable(cls, possible_browser): |
| 106 # http://crbug.com/612144 (reference on Nexus 5X). | 127 # http://crbug.com/612144 (reference on Nexus 5X). |
| 107 return possible_browser.platform.GetDeviceTypeName() == 'Desktop' or ( | 128 return possible_browser.platform.GetDeviceTypeName() == 'Desktop' or ( |
| 108 possible_browser.browser_type == 'reference' and | 129 possible_browser.browser_type == 'reference' and |
| 109 possible_browser.platform.GetDeviceTypeName() == 'Nexus 5X') | 130 possible_browser.platform.GetDeviceTypeName() == 'Nexus 5X') |
| OLD | NEW |