[Session restore] Rename group name Enabled to Restore.
[chromium-blink-merge.git] / tools / perf / benchmarks / thread_times.py
blob9d7400f8d2d4b1d9d59960d900d9303cb9b7cf7c
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 telemetry import benchmark
7 from benchmarks import silk_flags
8 from measurements import thread_times
9 import page_sets
11 class _ThreadTimes(benchmark.Benchmark):
12 @classmethod
13 def AddBenchmarkCommandLineArgs(cls, parser):
14 parser.add_option('--report-silk-details', action='store_true',
15 help='Report details relevant to silk.')
17 @classmethod
18 def Name(cls):
19 return 'thread_times'
21 def CreatePageTest(self, options):
22 return thread_times.ThreadTimes(options.report_silk_details)
25 @benchmark.Enabled('android')
26 class ThreadTimesKeySilkCases(_ThreadTimes):
27 """Measures timeline metrics while performing smoothness action on key silk
28 cases."""
29 page_set = page_sets.KeySilkCasesPageSet
31 @classmethod
32 def Name(cls):
33 return 'thread_times.key_silk_cases'
35 @benchmark.Enabled('android', 'linux')
36 class ThreadTimesKeyHitTestCases(_ThreadTimes):
37 """Measure timeline metrics while performing smoothness action on key hit
38 testing cases."""
39 page_set = page_sets.KeyHitTestCasesPageSet
41 @classmethod
42 def Name(cls):
43 return 'thread_times.key_hit_test_cases'
45 @benchmark.Enabled('android')
46 class ThreadTimesFastPathMobileSites(_ThreadTimes):
47 """Measures timeline metrics while performing smoothness action on
48 key mobile sites labeled with fast-path tag.
49 http://www.chromium.org/developers/design-documents/rendering-benchmarks"""
50 page_set = page_sets.KeyMobileSitesSmoothPageSet
51 options = {'story_label_filter' : 'fastpath'}
53 @classmethod
54 def Name(cls):
55 return 'thread_times.key_mobile_sites_smooth'
58 @benchmark.Enabled('android')
59 class ThreadTimesSimpleMobileSites(_ThreadTimes):
60 """Measures timeline metric using smoothness action on simple mobile sites
61 http://www.chromium.org/developers/design-documents/rendering-benchmarks"""
62 page_set = page_sets.SimpleMobileSitesPageSet
64 @classmethod
65 def Name(cls):
66 return 'thread_times.simple_mobile_sites'
69 @benchmark.Disabled('win') # crbug.com/443781
70 class ThreadTimesCompositorCases(_ThreadTimes):
71 """Measures timeline metrics while performing smoothness action on
72 tough compositor cases, using software rasterization.
74 http://www.chromium.org/developers/design-documents/rendering-benchmarks"""
75 page_set = page_sets.ToughCompositorCasesPageSet
76 def CustomizeBrowserOptions(self, options):
77 silk_flags.CustomizeBrowserOptionsForSoftwareRasterization(options)
79 @classmethod
80 def Name(cls):
81 return 'thread_times.tough_compositor_cases'
83 @benchmark.Enabled('android')
84 class ThreadTimesPolymer(_ThreadTimes):
85 """Measures timeline metrics while performing smoothness action on
86 Polymer cases."""
87 page_set = page_sets.PolymerPageSet
88 @classmethod
89 def Name(cls):
90 return 'thread_times.polymer'