Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(465)

Side by Side Diff: tools/perf/benchmarks/loading.py

Issue 2876073003: Migrate cluster telemetry benchmarks to tools/perf/contrib/cluster_telemetry/ (Closed)
Patch Set: Remove BENCHMARKS_BLACK_LIST Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
9 from benchmarks import page_cycler_v2 8 from benchmarks import page_cycler_v2
10 from telemetry import benchmark 9 from telemetry import benchmark
11 from telemetry.page import cache_temperature 10 from telemetry.page import cache_temperature
12 from telemetry.page import traffic_setting 11 from telemetry.page import traffic_setting
13 from telemetry.web_perf import timeline_based_measurement 12 from telemetry.web_perf import timeline_based_measurement
14 13
15 14
16 class _LoadingBase(perf_benchmark.PerfBenchmark): 15 class _LoadingBase(perf_benchmark.PerfBenchmark):
17 """ A base class for loading benchmarks. """ 16 """ A base class for loading benchmarks. """
18 17
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 return False 62 return False
64 63
65 def CreateStorySet(self, options): 64 def CreateStorySet(self, options):
66 return page_sets.LoadingMobileStorySet( 65 return page_sets.LoadingMobileStorySet(
67 cache_temperatures=[cache_temperature.ANY], 66 cache_temperatures=[cache_temperature.ANY],
68 traffic_settings=[traffic_setting.NONE, traffic_setting.REGULAR_3G]) 67 traffic_settings=[traffic_setting.NONE, traffic_setting.REGULAR_3G])
69 68
70 @classmethod 69 @classmethod
71 def Name(cls): 70 def Name(cls):
72 return 'loading.mobile' 71 return 'loading.mobile'
73
74
75 # Disabled because we do not plan on running CT benchmarks on the perf
76 # waterfall any time soon.
77 @benchmark.Disabled('all')
78 class LoadingClusterTelemetry(_LoadingBase):
79
80 options = {'upload_results': True}
81
82 _ALL_NET_CONFIGS = traffic_setting.NETWORK_CONFIGS.keys()
83
84 @classmethod
85 def AddBenchmarkCommandLineArgs(cls, parser):
86 super(LoadingClusterTelemetry, cls).AddBenchmarkCommandLineArgs(parser)
87 ct_benchmarks_util.AddBenchmarkCommandLineArgs(parser)
88 parser.add_option(
89 '--wait-time', action='store', type='int',
90 default=60, help='Number of seconds to wait for after navigation.')
91 parser.add_option(
92 '--traffic-setting', choices=cls._ALL_NET_CONFIGS,
93 default=traffic_setting.REGULAR_4G,
94 help='Traffic condition (string). Default to "%%default". Can be: %s' %
95 ', '.join(cls._ALL_NET_CONFIGS))
96
97 def CreateStorySet(self, options):
98 def Wait(action_runner):
99 action_runner.Wait(options.wait_time)
100 return page_sets.CTPageSet(
101 options.urls_list, options.user_agent, options.archive_data_file,
102 traffic_setting=options.traffic_setting,
103 run_page_interaction_callback=Wait)
104
105 @classmethod
106 def Name(cls):
107 return 'loading.cluster_telemetry'
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698