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 from core import perf_benchmark | 5 from core import perf_benchmark |
| 6 from telemetry import benchmark | 6 from telemetry import benchmark |
| 7 from telemetry.timeline import tracing_category_filter | 7 from telemetry.timeline import tracing_category_filter |
| 8 from telemetry.web_perf import timeline_based_measurement | 8 from telemetry.web_perf import timeline_based_measurement |
| 9 import page_sets | 9 import page_sets |
| 10 | 10 |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 31 | 31 |
| 32 | 32 |
| 33 @benchmark.Disabled('all') # crbug.com/613050 | 33 @benchmark.Disabled('all') # crbug.com/613050 |
| 34 class SystemHealthTop25(_SystemHealthBenchmark): | 34 class SystemHealthTop25(_SystemHealthBenchmark): |
| 35 page_set = page_sets.Top25PageSet | 35 page_set = page_sets.Top25PageSet |
| 36 | 36 |
| 37 @classmethod | 37 @classmethod |
| 38 def Name(cls): | 38 def Name(cls): |
| 39 return 'system_health.top25' | 39 return 'system_health.top25' |
| 40 | 40 |
| 41 | |
| 41 @benchmark.Disabled('android') # crbug.com/601953 | 42 @benchmark.Disabled('android') # crbug.com/601953 |
| 42 @benchmark.Disabled('all') # crbug.com/613050 | 43 @benchmark.Disabled('all') # crbug.com/613050 |
| 43 class SystemHealthKeyMobileSites(_SystemHealthBenchmark): | 44 class SystemHealthKeyMobileSites(_SystemHealthBenchmark): |
| 44 page_set = page_sets.KeyMobileSitesPageSet | 45 page_set = page_sets.KeyMobileSitesPageSet |
| 45 | 46 |
| 46 @classmethod | 47 @classmethod |
| 47 def Name(cls): | 48 def Name(cls): |
| 48 return 'system_health.key_mobile_sites' | 49 return 'system_health.key_mobile_sites' |
| 49 | 50 |
| 50 | 51 |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 66 tracing_category_filter.TracingCategoryFilter( | 67 tracing_category_filter.TracingCategoryFilter( |
| 67 '-*,disabled-by-default-memory-infra')) | 68 '-*,disabled-by-default-memory-infra')) |
| 68 options.config.enable_android_graphics_memtrack = True | 69 options.config.enable_android_graphics_memtrack = True |
| 69 options.SetTimelineBasedMetric('memoryMetric') | 70 options.SetTimelineBasedMetric('memoryMetric') |
| 70 return options | 71 return options |
| 71 | 72 |
| 72 @classmethod | 73 @classmethod |
| 73 def Name(cls): | 74 def Name(cls): |
| 74 return 'system_health.memory_%s' % cls.page_set.PLATFORM | 75 return 'system_health.memory_%s' % cls.page_set.PLATFORM |
| 75 | 76 |
| 77 @benchmark.Enabled('android') | |
| 78 class WebviewStartupSystemHealthBenchmark(_SystemHealthBenchmark): | |
| 79 """Chrome Webview Startup Time System Health Benchmark. | |
|
charliea (OOO until 10-5)
2016/06/08 20:57:58
I don't think this first line is useful. I'd prefe
alexandermont
2016/06/08 21:09:15
Done
| |
| 80 | |
| 81 Benchmark that measures the amount of time that WebView takes | |
| 82 to start up and then to load a blank page. | |
| 83 """ | |
| 84 page_set = page_sets.BlankPageSet | |
|
charliea (OOO until 10-5)
2016/06/08 20:57:58
nit: can you add a blank line between this line an
alexandermont
2016/06/08 21:09:15
Done
| |
| 85 def CreateTimelineBasedMeasurementOptions(self): | |
| 86 options = timeline_based_measurement.Options( | |
|
charliea (OOO until 10-5)
2016/06/08 20:57:58
nit: this can be deleted (it's the default)
alexandermont
2016/06/08 21:09:15
Done
| |
| 87 tracing_category_filter.TracingCategoryFilter()) | |
| 88 options.SetTimelineBasedMetric('webviewStartupMetric') | |
| 89 options.config.enable_atrace_trace = True | |
| 90 options.config.enable_chrome_trace = False | |
|
charliea (OOO until 10-5)
2016/06/08 20:57:58
nit: this can be deleted (it's the default)
alexandermont
2016/06/08 21:09:15
Done
| |
| 91 options.config.atrace_config.app_name = 'org.chromium.webview_shell' | |
| 92 return options | |
| 93 | |
| 94 @classmethod | |
| 95 def Name(cls): | |
| 96 return 'system_health.webview_startup' | |
| 97 | |
| 76 # https://github.com/catapult-project/catapult/issues/2340 | 98 # https://github.com/catapult-project/catapult/issues/2340 |
| 77 @benchmark.Disabled('all') | 99 @benchmark.Disabled('all') |
| 78 class DesktopMemorySystemHealth(_MemorySystemHealthBenchmark): | 100 class DesktopMemorySystemHealth(_MemorySystemHealthBenchmark): |
| 79 """Desktop Chrome Memory System Health Benchmark.""" | 101 """Desktop Chrome Memory System Health Benchmark.""" |
| 80 page_set = page_sets.DesktopMemorySystemHealthStorySet | 102 page_set = page_sets.DesktopMemorySystemHealthStorySet |
| 81 | 103 |
| 82 @classmethod | 104 @classmethod |
| 83 def ShouldDisable(cls, possible_browser): | 105 def ShouldDisable(cls, possible_browser): |
| 84 return possible_browser.platform.GetDeviceTypeName() != 'Desktop' | 106 return possible_browser.platform.GetDeviceTypeName() != 'Desktop' |
| 85 | 107 |
| 86 # https://github.com/catapult-project/catapult/issues/2340 | 108 # https://github.com/catapult-project/catapult/issues/2340 |
| 87 @benchmark.Disabled('all') | 109 @benchmark.Disabled('all') |
| 88 class MobileMemorySystemHealth(_MemorySystemHealthBenchmark): | 110 class MobileMemorySystemHealth(_MemorySystemHealthBenchmark): |
| 89 """Mobile Chrome Memory System Health Benchmark.""" | 111 """Mobile Chrome Memory System Health Benchmark.""" |
| 90 page_set = page_sets.MobileMemorySystemHealthStorySet | 112 page_set = page_sets.MobileMemorySystemHealthStorySet |
| 91 | 113 |
| 92 @classmethod | 114 @classmethod |
| 93 def ShouldDisable(cls, possible_browser): | 115 def ShouldDisable(cls, possible_browser): |
| 94 # http://crbug.com/612144 (reference on Nexus 5X). | 116 # http://crbug.com/612144 (reference on Nexus 5X). |
| 95 return possible_browser.platform.GetDeviceTypeName() == 'Desktop' or ( | 117 return possible_browser.platform.GetDeviceTypeName() == 'Desktop' or ( |
| 96 possible_browser.browser_type == 'reference' and | 118 possible_browser.browser_type == 'reference' and |
| 97 possible_browser.platform.GetDeviceTypeName() == 'Nexus 5X') | 119 possible_browser.platform.GetDeviceTypeName() == 'Nexus 5X') |
| OLD | NEW |