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

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

Issue 2843133002: [Telemetry] Create loading.desktop, a desktop analog for loading.mobile (Closed)
Patch Set: rebase, regenerate sharding, and regenerate perf data 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
« no previous file with comments | « tools/perf/benchmark.csv ('k') | tools/perf/core/benchmark_sharding_map.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 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 class _LoadingBase(perf_benchmark.PerfBenchmark): 16 class _LoadingBase(perf_benchmark.PerfBenchmark):
17 """ A base class for loading benchmarks. """ 17 """ A base class for loading benchmarks. """
18 18
19 options = {'pageset_repeat': 2} 19 options = {'pageset_repeat': 2}
20 20
21 def CreateTimelineBasedMeasurementOptions(self): 21 def CreateTimelineBasedMeasurementOptions(self):
22 tbm_options = timeline_based_measurement.Options() 22 tbm_options = timeline_based_measurement.Options()
23 page_cycler_v2.AugmentOptionsForLoadingMetrics(tbm_options) 23 page_cycler_v2.AugmentOptionsForLoadingMetrics(tbm_options)
24 return tbm_options 24 return tbm_options
25 25
26 26
27 @benchmark.Disabled('android')
28 @benchmark.Owner(emails=['kouhei@chormium.org', 'ksakamoto@chromium.org'])
29 class LoadingDesktop(_LoadingBase):
30 """ A benchmark measuring loading performance of desktop sites. """
31
32 @classmethod
33 def ShouldDisable(cls, possible_browser):
34 return possible_browser.browser_type == 'reference'
35
36 def CreateStorySet(self, options):
37 return page_sets.LoadingDesktopStorySet(
38 cache_temperatures=[cache_temperature.PCV1_COLD,
39 cache_temperature.PCV1_WARM,])
40
41 @classmethod
42 def Name(cls):
43 return 'loading.desktop'
44
45
27 @benchmark.Enabled('android') 46 @benchmark.Enabled('android')
28 @benchmark.Owner(emails=['kouhei@chromium.org', 'ksakamoto@chromium.org']) 47 @benchmark.Owner(emails=['kouhei@chromium.org', 'ksakamoto@chromium.org'])
29 class LoadingMobile(_LoadingBase): 48 class LoadingMobile(_LoadingBase):
30 """ A benchmark measuring loading performance of mobile sites. """ 49 """ A benchmark measuring loading performance of mobile sites. """
31 50
32 @classmethod 51 @classmethod
33 def ShouldDisable(cls, possible_browser): 52 def ShouldDisable(cls, possible_browser):
34 # crbug.com/619254 53 # crbug.com/619254
35 if possible_browser.browser_type == 'reference': 54 if possible_browser.browser_type == 'reference':
36 return True 55 return True
37 56
38 # crbug.com/676612 57 # crbug.com/676612
39 if ((possible_browser.platform.GetDeviceTypeName() == 'Nexus 6' or 58 if ((possible_browser.platform.GetDeviceTypeName() == 'Nexus 6' or
40 possible_browser.platform.GetDeviceTypeName() == 'AOSP on Shamu') and 59 possible_browser.platform.GetDeviceTypeName() == 'AOSP on Shamu') and
41 possible_browser.browser_type == 'android-webview'): 60 possible_browser.browser_type == 'android-webview'):
42 return True 61 return True
43 62
44 return False 63 return False
45 64
46 @classmethod
47 def Name(cls):
48 return 'loading.mobile'
49
50 def CreateStorySet(self, options): 65 def CreateStorySet(self, options):
51 return page_sets.LoadingMobileStorySet( 66 return page_sets.LoadingMobileStorySet(
52 cache_temperatures=[cache_temperature.ANY], 67 cache_temperatures=[cache_temperature.ANY],
53 traffic_settings=[traffic_setting.NONE, traffic_setting.REGULAR_3G]) 68 traffic_settings=[traffic_setting.NONE, traffic_setting.REGULAR_3G])
54 69
70 @classmethod
71 def Name(cls):
72 return 'loading.mobile'
73
55 74
56 # Disabled because we do not plan on running CT benchmarks on the perf 75 # Disabled because we do not plan on running CT benchmarks on the perf
57 # waterfall any time soon. 76 # waterfall any time soon.
58 @benchmark.Disabled('all') 77 @benchmark.Disabled('all')
59 class LoadingClusterTelemetry(_LoadingBase): 78 class LoadingClusterTelemetry(_LoadingBase):
60 79
61 options = {'upload_results': True} 80 options = {'upload_results': True}
62 81
63 _ALL_NET_CONFIGS = traffic_setting.NETWORK_CONFIGS.keys() 82 _ALL_NET_CONFIGS = traffic_setting.NETWORK_CONFIGS.keys()
64 83
65 @classmethod 84 @classmethod
66 def Name(cls):
67 return 'loading.cluster_telemetry'
68
69 @classmethod
70 def AddBenchmarkCommandLineArgs(cls, parser): 85 def AddBenchmarkCommandLineArgs(cls, parser):
71 super(LoadingClusterTelemetry, cls).AddBenchmarkCommandLineArgs(parser) 86 super(LoadingClusterTelemetry, cls).AddBenchmarkCommandLineArgs(parser)
72 ct_benchmarks_util.AddBenchmarkCommandLineArgs(parser) 87 ct_benchmarks_util.AddBenchmarkCommandLineArgs(parser)
73 parser.add_option( 88 parser.add_option(
74 '--wait-time', action='store', type='int', 89 '--wait-time', action='store', type='int',
75 default=60, help='Number of seconds to wait for after navigation.') 90 default=60, help='Number of seconds to wait for after navigation.')
76 parser.add_option( 91 parser.add_option(
77 '--traffic-setting', choices=cls._ALL_NET_CONFIGS, 92 '--traffic-setting', choices=cls._ALL_NET_CONFIGS,
78 default=traffic_setting.REGULAR_4G, 93 default=traffic_setting.REGULAR_4G,
79 help='Traffic condition (string). Default to "%%default". Can be: %s' % 94 help='Traffic condition (string). Default to "%%default". Can be: %s' %
80 ', '.join(cls._ALL_NET_CONFIGS)) 95 ', '.join(cls._ALL_NET_CONFIGS))
81 96
82 def CreateStorySet(self, options): 97 def CreateStorySet(self, options):
83 def Wait(action_runner): 98 def Wait(action_runner):
84 action_runner.Wait(options.wait_time) 99 action_runner.Wait(options.wait_time)
85 return page_sets.CTPageSet( 100 return page_sets.CTPageSet(
86 options.urls_list, options.user_agent, options.archive_data_file, 101 options.urls_list, options.user_agent, options.archive_data_file,
87 traffic_setting=options.traffic_setting, 102 traffic_setting=options.traffic_setting,
88 run_page_interaction_callback=Wait) 103 run_page_interaction_callback=Wait)
104
105 @classmethod
106 def Name(cls):
107 return 'loading.cluster_telemetry'
OLDNEW
« no previous file with comments | « tools/perf/benchmark.csv ('k') | tools/perf/core/benchmark_sharding_map.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698