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