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

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

Issue 2534243002: [tools/perf] Enable loading metrics for common system health benchmarks (Closed)
Patch Set: Fix loading.cluster_telemetry Created 4 years 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/benchmarks/loading.py ('k') | tools/perf/benchmarks/system_health.py » ('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 """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 chrome_trace_category_filter
17 from telemetry.web_perf import timeline_based_measurement 16 from telemetry.web_perf import timeline_based_measurement
18 17
19 18
20 def TimelineBasedMeasurementOptionsForLoadingMetric(): 19 def AugmentOptionsForLoadingMetrics(tbm_options):
21 cat_filter = chrome_trace_category_filter.ChromeTraceCategoryFilter() 20 cat_filter = tbm_options.config.chrome_trace_config.category_filter
22 21
23 # "blink.console" is used for marking ranges in 22 # "blink.console" is used for marking ranges in
24 # cache_temperature.MarkTelemetryInternal. 23 # cache_temperature.MarkTelemetryInternal.
25 cat_filter.AddIncludedCategory('blink.console') 24 cat_filter.AddIncludedCategory('blink.console')
26 25
27 # "navigation" and "blink.user_timing" are needed to capture core 26 # "navigation" and "blink.user_timing" are needed to capture core
28 # navigation events. 27 # navigation events.
29 cat_filter.AddIncludedCategory('navigation') 28 cat_filter.AddIncludedCategory('navigation')
30 cat_filter.AddIncludedCategory('blink.user_timing') 29 cat_filter.AddIncludedCategory('blink.user_timing')
31 30
32 # "loading" is needed for first-meaningful-paint computation. 31 # "loading" is needed for first-meaningful-paint computation.
33 cat_filter.AddIncludedCategory('loading') 32 cat_filter.AddIncludedCategory('loading')
34 33
35 # "toplevel" category is used to capture TaskQueueManager events 34 # "toplevel" category is used to capture TaskQueueManager events
36 # necessary to compute time-to-interactive. 35 # necessary to compute time-to-interactive.
37 cat_filter.AddIncludedCategory('toplevel') 36 cat_filter.AddIncludedCategory('toplevel')
38 37
39 tbm_options = timeline_based_measurement.Options( 38 tbm_options.AddTimelineBasedMetric('loadingMetric')
40 overhead_level=cat_filter)
41 tbm_options.SetTimelineBasedMetrics(['loadingMetric'])
42 return tbm_options 39 return tbm_options
43 40
44 41
45 class _PageCyclerV2(perf_benchmark.PerfBenchmark): 42 class _PageCyclerV2(perf_benchmark.PerfBenchmark):
46 options = {'pageset_repeat': 2} 43 options = {'pageset_repeat': 2}
47 44
48 def CreateTimelineBasedMeasurementOptions(self): 45 def CreateTimelineBasedMeasurementOptions(self):
49 return TimelineBasedMeasurementOptionsForLoadingMetric() 46 tbm_options = timeline_based_measurement.Options()
47 AugmentOptionsForLoadingMetrics(tbm_options)
48 return tbm_options
50 49
51 @classmethod 50 @classmethod
52 def ShouldDisable(cls, possible_browser): 51 def ShouldDisable(cls, possible_browser):
53 # crbug.com/619254 52 # crbug.com/619254
54 if possible_browser.browser_type == 'reference': 53 if possible_browser.browser_type == 'reference':
55 return True 54 return True
56 55
57 # crbug.com/616781 56 # crbug.com/616781
58 if (cls.IsSvelte(possible_browser) or 57 if (cls.IsSvelte(possible_browser) or
59 possible_browser.platform.GetDeviceTypeName() == 'Nexus 5X' or 58 possible_browser.platform.GetDeviceTypeName() == 'Nexus 5X' or
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 set, without running in out-of-process iframes mode.. """ 221 set, without running in out-of-process iframes mode.. """
223 page_set = page_sets.OopifBasicPageSet 222 page_set = page_sets.OopifBasicPageSet
224 223
225 @classmethod 224 @classmethod
226 def Name(cls): 225 def Name(cls):
227 return 'page_cycler_v2.basic_oopif' 226 return 'page_cycler_v2.basic_oopif'
228 227
229 def CreateStorySet(self, options): 228 def CreateStorySet(self, options):
230 return page_sets.OopifBasicPageSet(cache_temperatures=[ 229 return page_sets.OopifBasicPageSet(cache_temperatures=[
231 cache_temperature.PCV1_COLD, cache_temperature.PCV1_WARM]) 230 cache_temperature.PCV1_COLD, cache_temperature.PCV1_WARM])
OLDNEW
« no previous file with comments | « tools/perf/benchmarks/loading.py ('k') | tools/perf/benchmarks/system_health.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698