OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 from benchmarks import silk_flags | 5 from benchmarks import silk_flags |
6 from measurements import thread_times | 6 from measurements import thread_times |
7 import page_sets | 7 import page_sets |
8 from telemetry import benchmark | 8 from telemetry import benchmark |
9 | 9 |
10 class _ThreadTimes(benchmark.Benchmark): | 10 class _ThreadTimes(benchmark.Benchmark): |
11 @classmethod | 11 @classmethod |
12 def AddBenchmarkCommandLineArgs(cls, parser): | 12 def AddBenchmarkCommandLineArgs(cls, parser): |
13 parser.add_option('--report-silk-details', action='store_true', | 13 parser.add_option('--report-silk-details', action='store_true', |
14 help='Report details relevant to silk.') | 14 help='Report details relevant to silk.') |
15 | 15 |
| 16 @classmethod |
| 17 def Name(cls): |
| 18 return 'thread_times' |
| 19 |
16 def CreatePageTest(self, options): | 20 def CreatePageTest(self, options): |
17 return thread_times.ThreadTimes(options.report_silk_details) | 21 return thread_times.ThreadTimes(options.report_silk_details) |
18 | 22 |
19 | 23 |
20 @benchmark.Enabled('android') | 24 @benchmark.Enabled('android') |
21 class ThreadTimesKeySilkCases(_ThreadTimes): | 25 class ThreadTimesKeySilkCases(_ThreadTimes): |
22 """Measures timeline metrics while performing smoothness action on key silk | 26 """Measures timeline metrics while performing smoothness action on key silk |
23 cases.""" | 27 cases.""" |
24 page_set = page_sets.KeySilkCasesPageSet | 28 page_set = page_sets.KeySilkCasesPageSet |
25 | 29 |
| 30 @classmethod |
| 31 def Name(cls): |
| 32 return 'thread_times.key_silk_cases' |
| 33 |
26 @benchmark.Enabled('android', 'linux') | 34 @benchmark.Enabled('android', 'linux') |
27 class ThreadTimesKeyHitTestCases(_ThreadTimes): | 35 class ThreadTimesKeyHitTestCases(_ThreadTimes): |
28 """Measure timeline metrics while performing smoothness action on key hit | 36 """Measure timeline metrics while performing smoothness action on key hit |
29 testing cases.""" | 37 testing cases.""" |
30 page_set = page_sets.KeyHitTestCasesPageSet | 38 page_set = page_sets.KeyHitTestCasesPageSet |
31 | 39 |
32 @benchmark.Disabled | |
33 class LegacySilkBenchmark(ThreadTimesKeySilkCases): | |
34 """Same as thread_times.key_silk_cases but with the old name.""" | |
35 @classmethod | 40 @classmethod |
36 def Name(cls): | 41 def Name(cls): |
37 return "silk.key_silk_cases" | 42 return 'thread_times.key_hit_test_cases' |
38 | |
39 | 43 |
40 @benchmark.Enabled('android') | 44 @benchmark.Enabled('android') |
41 class ThreadTimesFastPathMobileSites(_ThreadTimes): | 45 class ThreadTimesFastPathMobileSites(_ThreadTimes): |
42 """Measures timeline metrics while performing smoothness action on | 46 """Measures timeline metrics while performing smoothness action on |
43 key mobile sites labeled with fast-path tag. | 47 key mobile sites labeled with fast-path tag. |
44 http://www.chromium.org/developers/design-documents/rendering-benchmarks""" | 48 http://www.chromium.org/developers/design-documents/rendering-benchmarks""" |
45 page_set = page_sets.KeyMobileSitesSmoothPageSet | 49 page_set = page_sets.KeyMobileSitesSmoothPageSet |
46 options = {'page_label_filter' : 'fastpath'} | 50 options = {'page_label_filter' : 'fastpath'} |
47 | 51 |
| 52 @classmethod |
| 53 def Name(cls): |
| 54 return 'thread_times.key_mobile_sites_smooth' |
| 55 |
48 | 56 |
49 @benchmark.Enabled('android') | 57 @benchmark.Enabled('android') |
50 class ThreadTimesSimpleMobileSites(_ThreadTimes): | 58 class ThreadTimesSimpleMobileSites(_ThreadTimes): |
51 """Measures timeline metric using smoothness action on simple mobile sites | 59 """Measures timeline metric using smoothness action on simple mobile sites |
52 http://www.chromium.org/developers/design-documents/rendering-benchmarks""" | 60 http://www.chromium.org/developers/design-documents/rendering-benchmarks""" |
53 page_set = page_sets.SimpleMobileSitesPageSet | 61 page_set = page_sets.SimpleMobileSitesPageSet |
54 | 62 |
| 63 @classmethod |
| 64 def Name(cls): |
| 65 return 'thread_times.simple_mobile_sites' |
| 66 |
55 | 67 |
56 @benchmark.Disabled('win') # crbug.com/443781 | 68 @benchmark.Disabled('win') # crbug.com/443781 |
57 class ThreadTimesCompositorCases(_ThreadTimes): | 69 class ThreadTimesCompositorCases(_ThreadTimes): |
58 """Measures timeline metrics while performing smoothness action on | 70 """Measures timeline metrics while performing smoothness action on |
59 tough compositor cases, using software rasterization. | 71 tough compositor cases, using software rasterization. |
60 | 72 |
61 http://www.chromium.org/developers/design-documents/rendering-benchmarks""" | 73 http://www.chromium.org/developers/design-documents/rendering-benchmarks""" |
62 page_set = page_sets.ToughCompositorCasesPageSet | 74 page_set = page_sets.ToughCompositorCasesPageSet |
63 def CustomizeBrowserOptions(self, options): | 75 def CustomizeBrowserOptions(self, options): |
64 silk_flags.CustomizeBrowserOptionsForSoftwareRasterization(options) | 76 silk_flags.CustomizeBrowserOptionsForSoftwareRasterization(options) |
65 | 77 |
| 78 @classmethod |
| 79 def Name(cls): |
| 80 return 'thread_times.tough_compositor_cases' |
| 81 |
66 @benchmark.Enabled('android') | 82 @benchmark.Enabled('android') |
67 class ThreadTimesPolymer(_ThreadTimes): | 83 class ThreadTimesPolymer(_ThreadTimes): |
68 """Measures timeline metrics while performing smoothness action on | 84 """Measures timeline metrics while performing smoothness action on |
69 Polymer cases.""" | 85 Polymer cases.""" |
70 page_set = page_sets.PolymerPageSet | 86 page_set = page_sets.PolymerPageSet |
| 87 @classmethod |
| 88 def Name(cls): |
| 89 return 'thread_times.polymer' |
| 90 |
OLD | NEW |