| 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 benchmarks import page_cycler_v2 | 7 from benchmarks import metric_dependencies |
| 8 | 8 |
| 9 from core import perf_benchmark | 9 from core import perf_benchmark |
| 10 | 10 |
| 11 from telemetry import benchmark | 11 from telemetry import benchmark |
| 12 from telemetry.timeline import chrome_trace_category_filter | 12 from telemetry.timeline import chrome_trace_category_filter |
| 13 from telemetry.timeline import chrome_trace_config | 13 from telemetry.timeline import chrome_trace_config |
| 14 from telemetry.web_perf import timeline_based_measurement | 14 from telemetry.web_perf import timeline_based_measurement |
| 15 import page_sets | 15 import page_sets |
| 16 | 16 |
| 17 | 17 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 34 """ | 34 """ |
| 35 | 35 |
| 36 def CreateTimelineBasedMeasurementOptions(self): | 36 def CreateTimelineBasedMeasurementOptions(self): |
| 37 options = timeline_based_measurement.Options( | 37 options = timeline_based_measurement.Options( |
| 38 chrome_trace_category_filter.ChromeTraceCategoryFilter()) | 38 chrome_trace_category_filter.ChromeTraceCategoryFilter()) |
| 39 options.config.chrome_trace_config.category_filter.AddFilterString('rail') | 39 options.config.chrome_trace_config.category_filter.AddFilterString('rail') |
| 40 options.config.enable_battor_trace = True | 40 options.config.enable_battor_trace = True |
| 41 options.config.enable_chrome_trace = True | 41 options.config.enable_chrome_trace = True |
| 42 options.SetTimelineBasedMetrics([ | 42 options.SetTimelineBasedMetrics([ |
| 43 'clockSyncLatencyMetric', | 43 'clockSyncLatencyMetric', |
| 44 'loadingMetric', |
| 44 'powerMetric', | 45 'powerMetric', |
| 45 'tracingMetric' | 46 'tracingMetric' |
| 46 ]) | 47 ]) |
| 47 page_cycler_v2.AugmentOptionsForLoadingMetrics(options) | 48 metric_dependencies.AugmentOptionsForMetrics(options, ['loadingMetric']) |
| 48 return options | 49 return options |
| 49 | 50 |
| 50 def CreateStorySet(self, options): | 51 def CreateStorySet(self, options): |
| 51 return page_sets.SystemHealthStorySet(platform=self.PLATFORM) | 52 return page_sets.SystemHealthStorySet(platform=self.PLATFORM) |
| 52 | 53 |
| 53 @classmethod | 54 @classmethod |
| 54 def ShouldTearDownStateAfterEachStoryRun(cls): | 55 def ShouldTearDownStateAfterEachStoryRun(cls): |
| 55 return True | 56 return True |
| 56 | 57 |
| 57 @classmethod | 58 @classmethod |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 and load a blank page with multiprocess enabled. | 177 and load a blank page with multiprocess enabled. |
| 177 """ | 178 """ |
| 178 | 179 |
| 179 def SetExtraBrowserOptions(self, options): | 180 def SetExtraBrowserOptions(self, options): |
| 180 options.AppendExtraBrowserArgs( | 181 options.AppendExtraBrowserArgs( |
| 181 ['--webview-sandboxed-renderer']) | 182 ['--webview-sandboxed-renderer']) |
| 182 | 183 |
| 183 @classmethod | 184 @classmethod |
| 184 def Name(cls): | 185 def Name(cls): |
| 185 return 'system_health.webview_startup_multiprocess' | 186 return 'system_health.webview_startup_multiprocess' |
| OLD | NEW |