| 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 core import perf_benchmark | 5 from core import perf_benchmark |
| 6 | 6 |
| 7 from benchmarks import silk_flags | 7 from benchmarks import silk_flags |
| 8 from measurements import thread_times | 8 from measurements import thread_times |
| 9 import page_sets | 9 import page_sets |
| 10 from telemetry import benchmark | 10 from telemetry import benchmark |
| 11 | 11 |
| 12 | 12 |
| 13 class _ThreadTimes(perf_benchmark.PerfBenchmark): | 13 class _ThreadTimes(perf_benchmark.PerfBenchmark): |
| 14 | 14 |
| 15 @classmethod | 15 @classmethod |
| 16 def AddBenchmarkCommandLineArgs(cls, parser): | 16 def AddBenchmarkCommandLineArgs(cls, parser): |
| 17 parser.add_option('--report-silk-details', action='store_true', | 17 parser.add_option('--report-silk-details', action='store_true', |
| 18 help='Report details relevant to silk.') | 18 help='Report details relevant to silk.') |
| 19 | 19 |
| 20 @classmethod | 20 @classmethod |
| 21 def Name(cls): | 21 def Name(cls): |
| 22 return 'thread_times' | 22 return 'thread_times' |
| 23 | 23 |
| 24 @classmethod | 24 @classmethod |
| 25 def ValueCanBeAddedPredicate(cls, value, _): | 25 def ValueCanBeAddedPredicate(cls, value, _): |
| 26 # Default to only reporting per-frame metrics. | 26 # Default to only reporting per-frame metrics. |
| 27 return 'per_second' not in value.name | 27 return 'per_second' not in value.name |
| 28 | 28 |
| 29 def SetExtraBrowserOptions(self, options): |
| 30 silk_flags.CustomizeBrowserOptionsForThreadTimes(options) |
| 31 |
| 29 def CreatePageTest(self, options): | 32 def CreatePageTest(self, options): |
| 30 return thread_times.ThreadTimes(options.report_silk_details) | 33 return thread_times.ThreadTimes(options.report_silk_details) |
| 31 | 34 |
| 32 | 35 |
| 33 @benchmark.Enabled('android') | 36 @benchmark.Enabled('android') |
| 34 class ThreadTimesKeySilkCases(_ThreadTimes): | 37 class ThreadTimesKeySilkCases(_ThreadTimes): |
| 35 """Measures timeline metrics while performing smoothness action on key silk | 38 """Measures timeline metrics while performing smoothness action on key silk |
| 36 cases.""" | 39 cases.""" |
| 37 page_set = page_sets.KeySilkCasesPageSet | 40 page_set = page_sets.KeySilkCasesPageSet |
| 38 | 41 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 | 80 |
| 78 | 81 |
| 79 class ThreadTimesCompositorCases(_ThreadTimes): | 82 class ThreadTimesCompositorCases(_ThreadTimes): |
| 80 """Measures timeline metrics while performing smoothness action on | 83 """Measures timeline metrics while performing smoothness action on |
| 81 tough compositor cases, using software rasterization. | 84 tough compositor cases, using software rasterization. |
| 82 | 85 |
| 83 http://www.chromium.org/developers/design-documents/rendering-benchmarks""" | 86 http://www.chromium.org/developers/design-documents/rendering-benchmarks""" |
| 84 page_set = page_sets.ToughCompositorCasesPageSet | 87 page_set = page_sets.ToughCompositorCasesPageSet |
| 85 | 88 |
| 86 def SetExtraBrowserOptions(self, options): | 89 def SetExtraBrowserOptions(self, options): |
| 90 super(ThreadTimesCompositorCases, self).SetExtraBrowserOptions(options) |
| 87 silk_flags.CustomizeBrowserOptionsForSoftwareRasterization(options) | 91 silk_flags.CustomizeBrowserOptionsForSoftwareRasterization(options) |
| 88 | 92 |
| 89 @classmethod | 93 @classmethod |
| 90 def Name(cls): | 94 def Name(cls): |
| 91 return 'thread_times.tough_compositor_cases' | 95 return 'thread_times.tough_compositor_cases' |
| 92 | 96 |
| 93 | 97 |
| 94 @benchmark.Enabled('android') | 98 @benchmark.Enabled('android') |
| 95 class ThreadTimesPolymer(_ThreadTimes): | 99 class ThreadTimesPolymer(_ThreadTimes): |
| 96 """Measures timeline metrics while performing smoothness action on | 100 """Measures timeline metrics while performing smoothness action on |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 | 139 |
| 136 | 140 |
| 137 class ThreadTimesToughScrollingCases(_ThreadTimes): | 141 class ThreadTimesToughScrollingCases(_ThreadTimes): |
| 138 """Measure timeline metrics while performing smoothness action on tough | 142 """Measure timeline metrics while performing smoothness action on tough |
| 139 scrolling cases.""" | 143 scrolling cases.""" |
| 140 page_set = page_sets.ToughScrollingCasesPageSet | 144 page_set = page_sets.ToughScrollingCasesPageSet |
| 141 | 145 |
| 142 @classmethod | 146 @classmethod |
| 143 def Name(cls): | 147 def Name(cls): |
| 144 return 'thread_times.tough_scrolling_cases' | 148 return 'thread_times.tough_scrolling_cases' |
| OLD | NEW |