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 chrome_trace_category_filter | 9 from telemetry.timeline import chrome_trace_category_filter |
| 10 from telemetry.web_perf import timeline_based_measurement | 10 from telemetry.web_perf import timeline_based_measurement |
| 11 import page_sets | 11 import page_sets |
| 12 | 12 |
| 13 | 13 |
| 14 # See tr.v.Numeric.getSummarizedScalarNumericsWithNames() | 14 # See tr.v.Numeric.getSummarizedScalarNumericsWithNames() |
| 15 # https://github.com/catapult-project/catapult/blob/master/tracing/tracing/value /numeric.html#L323 | 15 # https://github.com/catapult-project/catapult/blob/master/tracing/tracing/value /numeric.html#L323 |
| 16 _IGNORED_STATS_RE = re.compile(r'_(std|count|max|min|sum|pct_\d{4}(_\d+)?)$') | 16 _IGNORED_STATS_RE = re.compile(r'_(std|count|max|min|sum|pct_\d{4}(_\d+)?)$') |
| 17 | 17 |
| 18 | 18 |
| 19 class _SystemHealthBenchmark(perf_benchmark.PerfBenchmark): | |
|
nednguyen
2016/08/02 19:21:49
Remove these because the benchmarks are disabled &
petrcermak
2016/08/03 08:49:27
Acknowledged.
| |
| 20 TRACING_CATEGORIES = [ | |
| 21 'benchmark', | |
| 22 'navigation', | |
| 23 'blink.user_timing', | |
| 24 ] | |
| 25 | |
| 26 def CreateTimelineBasedMeasurementOptions(self): | |
| 27 options = timeline_based_measurement.Options() | |
| 28 options.config.chrome_trace_config.SetCategoryFilter( | |
| 29 chrome_trace_category_filter.ChromeTraceCategoryFilter(','.join( | |
| 30 self.TRACING_CATEGORIES))) | |
| 31 options.SetTimelineBasedMetrics(['systemHealthMetrics']) | |
| 32 return options | |
| 33 | |
| 34 @classmethod | |
| 35 def ShouldDisable(cls, browser): | |
| 36 # http://crbug.com/600463 | |
| 37 galaxy_s5_type_name = 'SM-G900H' | |
| 38 return browser.platform.GetDeviceTypeName() == galaxy_s5_type_name | |
| 39 | |
| 40 | |
| 41 @benchmark.Disabled('all') # crbug.com/613050 | |
| 42 class SystemHealthTop25(_SystemHealthBenchmark): | |
| 43 page_set = page_sets.Top25PageSet | |
| 44 | |
| 45 @classmethod | |
| 46 def Name(cls): | |
| 47 return 'system_health.top25' | |
| 48 | |
| 49 | |
| 50 @benchmark.Disabled('android') # crbug.com/601953 | |
| 51 @benchmark.Disabled('all') # crbug.com/613050 | |
| 52 class SystemHealthKeyMobileSites(_SystemHealthBenchmark): | |
| 53 page_set = page_sets.KeyMobileSitesPageSet | |
| 54 | |
| 55 @classmethod | |
| 56 def Name(cls): | |
| 57 return 'system_health.key_mobile_sites' | |
| 58 | |
| 59 | |
| 60 class _MemorySystemHealthBenchmark(perf_benchmark.PerfBenchmark): | 19 class _MemorySystemHealthBenchmark(perf_benchmark.PerfBenchmark): |
| 61 """Chrome Memory System Health Benchmark. | 20 """Chrome Memory System Health Benchmark. |
| 62 | 21 |
| 63 https://goo.gl/Jek2NL. | 22 https://goo.gl/Jek2NL. |
| 64 """ | 23 """ |
| 65 | 24 |
| 66 def SetExtraBrowserOptions(self, options): | 25 def SetExtraBrowserOptions(self, options): |
| 67 options.AppendExtraBrowserArgs([ | 26 options.AppendExtraBrowserArgs([ |
| 68 # TODO(perezju): Temporary workaround to disable periodic memory dumps. | 27 # TODO(perezju): Temporary workaround to disable periodic memory dumps. |
| 69 # See: http://crbug.com/513692 | 28 # See: http://crbug.com/513692 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 141 options.config.atrace_config.app_name = 'org.chromium.webview_shell' | 100 options.config.atrace_config.app_name = 'org.chromium.webview_shell' |
| 142 return options | 101 return options |
| 143 | 102 |
| 144 @classmethod | 103 @classmethod |
| 145 def ShouldTearDownStateAfterEachStoryRun(cls): | 104 def ShouldTearDownStateAfterEachStoryRun(cls): |
| 146 return True | 105 return True |
| 147 | 106 |
| 148 @classmethod | 107 @classmethod |
| 149 def Name(cls): | 108 def Name(cls): |
| 150 return 'system_health.webview_startup' | 109 return 'system_health.webview_startup' |
| OLD | NEW |