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