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
11 class _ThreadTimes(benchmark
.Benchmark
):
13 def AddBenchmarkCommandLineArgs(cls
, parser
):
14 parser
.add_option('--report-silk-details', action
='store_true',
15 help='Report details relevant to silk.')
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
29 page_set
= page_sets
.KeySilkCasesPageSet
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
39 page_set
= page_sets
.KeyHitTestCasesPageSet
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'}
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
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
)
81 return 'thread_times.tough_compositor_cases'
83 @benchmark.Enabled('android')
84 class ThreadTimesPolymer(_ThreadTimes
):
85 """Measures timeline metrics while performing smoothness action on
87 page_set
= page_sets
.PolymerPageSet
90 return 'thread_times.polymer'