cygprofile: increase timeouts to allow showing web contents
[chromium-blink-merge.git] / tools / perf / benchmarks / thread_times.py
blobaf75c7da76c742a197273ea4ebe0cbd56eb3387d
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 from core import perf_benchmark
7 from benchmarks import silk_flags
8 from measurements import thread_times
9 import page_sets
10 from telemetry import benchmark
12 class _ThreadTimes(perf_benchmark.PerfBenchmark):
13 @classmethod
14 def AddBenchmarkCommandLineArgs(cls, parser):
15 parser.add_option('--report-silk-details', action='store_true',
16 help='Report details relevant to silk.')
18 @classmethod
19 def Name(cls):
20 return 'thread_times'
22 @classmethod
23 def ValueCanBeAddedPredicate(cls, value, _):
24 # Default to only reporting per-frame metrics.
25 return 'per_second' not in value.name
27 def CreatePageTest(self, options):
28 return thread_times.ThreadTimes(options.report_silk_details)
31 @benchmark.Enabled('android')
32 class ThreadTimesKeySilkCases(_ThreadTimes):
33 """Measures timeline metrics while performing smoothness action on key silk
34 cases."""
35 page_set = page_sets.KeySilkCasesPageSet
37 @classmethod
38 def Name(cls):
39 return 'thread_times.key_silk_cases'
42 @benchmark.Enabled('android', 'linux')
43 class ThreadTimesKeyHitTestCases(_ThreadTimes):
44 """Measure timeline metrics while performing smoothness action on key hit
45 testing cases."""
46 page_set = page_sets.KeyHitTestCasesPageSet
48 @classmethod
49 def Name(cls):
50 return 'thread_times.key_hit_test_cases'
53 @benchmark.Enabled('android')
54 class ThreadTimesFastPathMobileSites(_ThreadTimes):
55 """Measures timeline metrics while performing smoothness action on
56 key mobile sites labeled with fast-path tag.
57 http://www.chromium.org/developers/design-documents/rendering-benchmarks"""
58 page_set = page_sets.KeyMobileSitesSmoothPageSet
59 options = {'story_label_filter' : 'fastpath'}
61 @classmethod
62 def Name(cls):
63 return 'thread_times.key_mobile_sites_smooth'
66 @benchmark.Enabled('android')
67 class ThreadTimesSimpleMobileSites(_ThreadTimes):
68 """Measures timeline metric using smoothness action on simple mobile sites
69 http://www.chromium.org/developers/design-documents/rendering-benchmarks"""
70 page_set = page_sets.SimpleMobileSitesPageSet
72 @classmethod
73 def Name(cls):
74 return 'thread_times.simple_mobile_sites'
77 @benchmark.Disabled('win') # crbug.com/443781
78 class ThreadTimesCompositorCases(_ThreadTimes):
79 """Measures timeline metrics while performing smoothness action on
80 tough compositor cases, using software rasterization.
82 http://www.chromium.org/developers/design-documents/rendering-benchmarks"""
83 page_set = page_sets.ToughCompositorCasesPageSet
84 def SetExtraBrowserOptions(self, options):
85 silk_flags.CustomizeBrowserOptionsForSoftwareRasterization(options)
87 @classmethod
88 def Name(cls):
89 return 'thread_times.tough_compositor_cases'
91 @benchmark.Enabled('android')
92 class ThreadTimesPolymer(_ThreadTimes):
93 """Measures timeline metrics while performing smoothness action on
94 Polymer cases."""
95 page_set = page_sets.PolymerPageSet
96 @classmethod
97 def Name(cls):
98 return 'thread_times.polymer'
101 @benchmark.Enabled('android')
102 class ThreadTimesKeyIdlePowerCases(_ThreadTimes):
103 """Measures timeline metrics for sites that should be idle in foreground
104 and background scenarios. The metrics are per-second rather than per-frame."""
105 page_set = page_sets.KeyIdlePowerCasesPageSet
107 @classmethod
108 def Name(cls):
109 return 'thread_times.key_idle_power_cases'
111 @classmethod
112 def ValueCanBeAddedPredicate(cls, value, _):
113 # Only report per-second metrics.
114 return 'per_frame' not in value.name and 'mean_frame' not in value.name
117 @benchmark.Enabled('android')
118 class ThreadTimesKeyNoOpCases(_ThreadTimes):
119 """Measures timeline metrics for common interactions and behaviors that should
120 have minimal cost. The metrics are per-second rather than per-frame."""
121 page_set = page_sets.KeyNoOpCasesPageSet
123 @classmethod
124 def Name(cls):
125 return 'thread_times.key_noop_cases'
127 @classmethod
128 def ValueCanBeAddedPredicate(cls, value, _):
129 # Only report per-second metrics.
130 return 'per_frame' not in value.name and 'mean_frame' not in value.name
133 class ThreadTimesToughScrollingCases(_ThreadTimes):
134 """Measure timeline metrics while performing smoothness action on tough
135 scrolling cases."""
136 page_set = page_sets.ToughScrollingCasesPageSet
138 @classmethod
139 def Name(cls):
140 return 'thread_times.tough_scrolling_cases'