| 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.page import cache_temperature | 14 from telemetry.page import cache_temperature |
| 15 from telemetry.timeline import tracing_category_filter | 15 from telemetry.timeline import tracing_category_filter |
| 16 from telemetry.web_perf import timeline_based_measurement | 16 from telemetry.web_perf import timeline_based_measurement |
| 17 | 17 |
| 18 class _PageCyclerV2(perf_benchmark.PerfBenchmark): | 18 class _PageCyclerV2(perf_benchmark.PerfBenchmark): |
| 19 def CreateTimelineBasedMeasurementOptions(self): | 19 def CreateTimelineBasedMeasurementOptions(self): |
| 20 cat_filter = tracing_category_filter.TracingCategoryFilter( | 20 cat_filter = tracing_category_filter.TracingCategoryFilter( |
| 21 filter_string='*,blink.console,navigation,blink.user_timing,loading') | 21 filter_string='*,blink.console,navigation,blink.user_timing,loading') |
| 22 | 22 |
| 23 tbm_options = timeline_based_measurement.Options( | 23 tbm_options = timeline_based_measurement.Options( |
| 24 overhead_level=cat_filter) | 24 overhead_level=cat_filter) |
| 25 tbm_options.SetTimelineBasedMetric('firstPaintMetric') | 25 tbm_options.SetTimelineBasedMetric('firstPaintMetric') |
| 26 return tbm_options | 26 return tbm_options |
| 27 | 27 |
| 28 class PageCyclerTypical25(_PageCyclerV2): | 28 class PageCyclerV2Typical25(_PageCyclerV2): |
| 29 """Page load time benchmark for a 25 typical web pages. | 29 """Page load time benchmark for a 25 typical web pages. |
| 30 | 30 |
| 31 Designed to represent typical, not highly optimized or highly popular web | 31 Designed to represent typical, not highly optimized or highly popular web |
| 32 sites. Runs against pages recorded in June, 2014. | 32 sites. Runs against pages recorded in June, 2014. |
| 33 """ | 33 """ |
| 34 options = {'pageset_repeat': 3} | 34 options = {'pageset_repeat': 3} |
| 35 | 35 |
| 36 @classmethod | 36 @classmethod |
| 37 def Name(cls): | 37 def Name(cls): |
| 38 return 'page_cycler_v2.typical_25' | 38 return 'page_cycler_v2.typical_25' |
| 39 | 39 |
| 40 def CreateStorySet(self, options): | 40 def CreateStorySet(self, options): |
| 41 return page_sets.Typical25PageSet(run_no_page_interactions=True, | 41 return page_sets.Typical25PageSet(run_no_page_interactions=True, |
| 42 cache_temperatures=[ | 42 cache_temperatures=[ |
| 43 cache_temperature.PCV1_COLD, cache_temperature.PCV1_WARM]) | 43 cache_temperature.PCV1_COLD, cache_temperature.PCV1_WARM]) |
| OLD | NEW |