| OLD | NEW |
| (Empty) | |
| 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 |
| 3 # found in the LICENSE file. |
| 4 |
| 5 from core import perf_benchmark |
| 6 from telemetry.timeline import tracing_category_filter |
| 7 from telemetry.web_perf import timeline_based_measurement |
| 8 import page_sets |
| 9 |
| 10 class _SystemHealthBenchmark(perf_benchmark.PerfBenchmark): |
| 11 TRACING_CATEGORIES = [ |
| 12 'benchmark', |
| 13 'navigation', |
| 14 'blink.user_timing', |
| 15 ] |
| 16 |
| 17 def CreateTimelineBasedMeasurementOptions(self): |
| 18 options = timeline_based_measurement.Options() |
| 19 options.config.SetTracingCategoryFilter( |
| 20 tracing_category_filter.TracingCategoryFilter(','.join( |
| 21 self.TRACING_CATEGORIES))) |
| 22 options.SetTimelineBasedMetric('SystemHealthMetrics') |
| 23 return options |
| 24 |
| 25 @classmethod |
| 26 def ShouldDisable(cls, browser): |
| 27 # http://crbug.com/600463 |
| 28 galaxy_s5_type_name = 'SM-G900H' |
| 29 return browser.platform.GetDeviceTypeName() == galaxy_s5_type_name |
| 30 |
| 31 |
| 32 class SystemHealthTop25(_SystemHealthBenchmark): |
| 33 page_set = page_sets.Top25PageSet |
| 34 |
| 35 @classmethod |
| 36 def Name(cls): |
| 37 return 'system_health.top25' |
| 38 |
| 39 |
| 40 class SystemHealthKeyMobileSites(_SystemHealthBenchmark): |
| 41 page_set = page_sets.KeyMobileSitesPageSet |
| 42 |
| 43 @classmethod |
| 44 def Name(cls): |
| 45 return 'system_health.key_mobile_sites' |
| 46 |
| OLD | NEW |