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 benchmarks
import silk_flags
6 from measurements
import thread_times
8 from telemetry
import benchmark
10 class _ThreadTimes(benchmark
.Benchmark
):
12 def AddBenchmarkCommandLineArgs(cls
, parser
):
13 parser
.add_option('--report-silk-details', action
='store_true',
14 help='Report details relevant to silk.')
16 def CreatePageTest(self
, options
):
17 return thread_times
.ThreadTimes(options
.report_silk_details
)
20 @benchmark.Enabled('android')
21 class ThreadTimesKeySilkCases(_ThreadTimes
):
22 """Measures timeline metrics while performing smoothness action on key silk
24 page_set
= page_sets
.KeySilkCasesPageSet
28 class LegacySilkBenchmark(ThreadTimesKeySilkCases
):
29 """Same as thread_times.key_silk_cases but with the old name."""
32 return "silk.key_silk_cases"
35 @benchmark.Enabled('android')
36 class ThreadTimesFastPathMobileSites(_ThreadTimes
):
37 """Measures timeline metrics while performing smoothness action on
38 key mobile sites labeled with fast-path tag.
39 http://www.chromium.org/developers/design-documents/rendering-benchmarks"""
40 page_set
= page_sets
.KeyMobileSitesPageSet
41 options
= {'page_label_filter' : 'fastpath'}
44 @benchmark.Enabled('android')
45 class ThreadTimesSimpleMobileSites(_ThreadTimes
):
46 """Measures timeline metric using smoothness action on simple mobile sites
47 http://www.chromium.org/developers/design-documents/rendering-benchmarks"""
48 page_set
= page_sets
.SimpleMobileSitesPageSet
51 class ThreadTimesCompositorCases(_ThreadTimes
):
52 """Measures timeline metrics while performing smoothness action on
53 tough compositor cases, using software rasterization.
55 http://www.chromium.org/developers/design-documents/rendering-benchmarks"""
56 page_set
= page_sets
.ToughCompositorCasesPageSet
57 def CustomizeBrowserOptions(self
, options
):
58 silk_flags
.CustomizeBrowserOptionsForSoftwareRasterization(options
)
60 @benchmark.Enabled('android')
61 class ThreadTimesPolymer(_ThreadTimes
):
62 """Measures timeline metrics while performing smoothness action on
64 page_set
= page_sets
.PolymerPageSet