| 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 from core import perf_benchmark | 5 from core import perf_benchmark |
| 6 import page_sets | 6 import page_sets |
| 7 | 7 |
| 8 import ct_benchmarks_util | 8 import ct_benchmarks_util |
| 9 from benchmarks import page_cycler_v2 | 9 from benchmarks import page_cycler_v2 |
| 10 from telemetry import benchmark | 10 from telemetry import benchmark |
| 11 from telemetry.page import cache_temperature | 11 from telemetry.page import cache_temperature |
| 12 from telemetry.page import traffic_setting | 12 from telemetry.page import traffic_setting |
| 13 from telemetry.web_perf import timeline_based_measurement | 13 from telemetry.web_perf import timeline_based_measurement |
| 14 | 14 |
| 15 | 15 |
| 16 @benchmark.Enabled('android') | 16 @benchmark.Enabled('android') |
| 17 @benchmark.Owner(emails=['kouhei@chromium.org', 'ksakamoto@chromium.org']) |
| 17 class LoadingMobile(perf_benchmark.PerfBenchmark): | 18 class LoadingMobile(perf_benchmark.PerfBenchmark): |
| 18 """ A benchmark measuring loading performance of mobile sites. """ | 19 """ A benchmark measuring loading performance of mobile sites. """ |
| 19 | 20 |
| 20 options = {'pageset_repeat': 2} | 21 options = {'pageset_repeat': 2} |
| 21 | 22 |
| 22 def CreateTimelineBasedMeasurementOptions(self): | 23 def CreateTimelineBasedMeasurementOptions(self): |
| 23 tbm_options = timeline_based_measurement.Options() | 24 tbm_options = timeline_based_measurement.Options() |
| 24 page_cycler_v2.AugmentOptionsForLoadingMetrics(tbm_options) | 25 page_cycler_v2.AugmentOptionsForLoadingMetrics(tbm_options) |
| 25 return tbm_options | 26 return tbm_options |
| 26 | 27 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 help='Traffic condition (string). Default to "%%default". Can be: %s' % | 80 help='Traffic condition (string). Default to "%%default". Can be: %s' % |
| 80 ', '.join(cls._ALL_NET_CONFIGS)) | 81 ', '.join(cls._ALL_NET_CONFIGS)) |
| 81 | 82 |
| 82 def CreateStorySet(self, options): | 83 def CreateStorySet(self, options): |
| 83 def Wait(action_runner): | 84 def Wait(action_runner): |
| 84 action_runner.Wait(options.wait_time) | 85 action_runner.Wait(options.wait_time) |
| 85 return page_sets.CTPageSet( | 86 return page_sets.CTPageSet( |
| 86 options.urls_list, options.user_agent, options.archive_data_file, | 87 options.urls_list, options.user_agent, options.archive_data_file, |
| 87 traffic_setting=options.traffic_setting, | 88 traffic_setting=options.traffic_setting, |
| 88 run_page_interaction_callback=Wait) | 89 run_page_interaction_callback=Wait) |
| OLD | NEW |