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 """The page cycler v2. | 5 """The page cycler v2. |
| 6 | 6 |
| 7 For details, see design doc: | 7 For details, see design doc: |
| 8 https://docs.google.com/document/d/1EZQX-x3eEphXupiX-Hq7T4Afju5_sIdxPWYetj7ynd0 | 8 https://docs.google.com/document/d/1EZQX-x3eEphXupiX-Hq7T4Afju5_sIdxPWYetj7ynd0 |
| 9 """ | 9 """ |
| 10 | 10 |
| 11 from core import perf_benchmark | 11 from core import perf_benchmark |
| 12 import page_sets | 12 import page_sets |
| 13 | 13 |
| 14 from telemetry import benchmark | 14 from telemetry import benchmark |
| 15 from telemetry.page import cache_temperature | 15 from telemetry.page import cache_temperature |
| 16 from telemetry.timeline import tracing_category_filter | 16 from telemetry.timeline import tracing_category_filter |
| 17 from telemetry.web_perf import timeline_based_measurement | 17 from telemetry.web_perf import timeline_based_measurement |
| 18 | 18 |
| 19 | 19 |
| 20 class _PageCyclerV2(perf_benchmark.PerfBenchmark): | 20 class _PageCyclerV2(perf_benchmark.PerfBenchmark): |
| 21 def CreateTimelineBasedMeasurementOptions(self): | 21 def CreateTimelineBasedMeasurementOptions(self): |
| 22 cat_filter = tracing_category_filter.TracingCategoryFilter( | 22 cat_filter = tracing_category_filter.TracingCategoryFilter( |
| 23 filter_string='*,blink.console,navigation,blink.user_timing,loading') | 23 filter_string='*,blink.console,navigation,blink.user_timing,loading') |
| 24 | 24 |
| 25 # Needed for first-meaningful-paint computation. | |
| 26 cat_filter.AddIncludedCategory('disabled-by-default-blink.debug.layout') | |
|
Kunihiko Sakamoto
2016/06/08 01:56:50
We also need devtools.timeline category for the pa
kouhei (in TOK)
2016/06/08 01:59:07
Done.
| |
| 27 | |
| 25 tbm_options = timeline_based_measurement.Options( | 28 tbm_options = timeline_based_measurement.Options( |
| 26 overhead_level=cat_filter) | 29 overhead_level=cat_filter) |
| 27 tbm_options.SetTimelineBasedMetric('firstPaintMetric') | 30 tbm_options.SetTimelineBasedMetric('firstPaintMetric') |
| 28 return tbm_options | 31 return tbm_options |
| 29 | 32 |
| 30 | 33 |
| 31 @benchmark.Disabled('win') # crbug.com/615178 | 34 @benchmark.Disabled('win') # crbug.com/615178 |
| 32 class PageCyclerV2Typical25(_PageCyclerV2): | 35 class PageCyclerV2Typical25(_PageCyclerV2): |
| 33 """Page load time benchmark for a 25 typical web pages. | 36 """Page load time benchmark for a 25 typical web pages. |
| 34 | 37 |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 45 def ShouldDisable(cls, possible_browser): # crbug.com/615178 | 48 def ShouldDisable(cls, possible_browser): # crbug.com/615178 |
| 46 return ((possible_browser.browser_type == 'reference' and | 49 return ((possible_browser.browser_type == 'reference' and |
| 47 possible_browser.platform.GetOSName() == 'android') or | 50 possible_browser.platform.GetOSName() == 'android') or |
| 48 cls.IsSvelte(possible_browser) or # crbug.com/616781 | 51 cls.IsSvelte(possible_browser) or # crbug.com/616781 |
| 49 possible_browser.platform.GetDeviceTypeName() == 'Nexus 5X') | 52 possible_browser.platform.GetDeviceTypeName() == 'Nexus 5X') |
| 50 | 53 |
| 51 def CreateStorySet(self, options): | 54 def CreateStorySet(self, options): |
| 52 return page_sets.Typical25PageSet(run_no_page_interactions=True, | 55 return page_sets.Typical25PageSet(run_no_page_interactions=True, |
| 53 cache_temperatures=[ | 56 cache_temperatures=[ |
| 54 cache_temperature.PCV1_COLD, cache_temperature.PCV1_WARM]) | 57 cache_temperature.PCV1_COLD, cache_temperature.PCV1_WARM]) |
| OLD | NEW |