| OLD | NEW |
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 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 import ct_benchmarks_util | |
| 8 from measurements import rasterize_and_record_micro | 7 from measurements import rasterize_and_record_micro |
| 9 import page_sets | 8 import page_sets |
| 10 from page_sets import repaint_helpers | |
| 11 from telemetry import benchmark | 9 from telemetry import benchmark |
| 12 | 10 |
| 13 | 11 |
| 14 class _RasterizeAndRecordMicro(perf_benchmark.PerfBenchmark): | 12 class _RasterizeAndRecordMicro(perf_benchmark.PerfBenchmark): |
| 15 | 13 |
| 16 @classmethod | 14 @classmethod |
| 17 def AddBenchmarkCommandLineArgs(cls, parser): | 15 def AddBenchmarkCommandLineArgs(cls, parser): |
| 18 parser.add_option('--start-wait-time', type='float', | 16 parser.add_option('--start-wait-time', type='float', |
| 19 default=2, | 17 default=2, |
| 20 help='Wait time before the benchmark is started ' | 18 help='Wait time before the benchmark is started ' |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 """Measures rasterize and record performance for partial inval. on big pages. | 106 """Measures rasterize and record performance for partial inval. on big pages. |
| 109 | 107 |
| 110 http://www.chromium.org/developers/design-documents/rendering-benchmarks""" | 108 http://www.chromium.org/developers/design-documents/rendering-benchmarks""" |
| 111 page_set = page_sets.PartialInvalidationCasesPageSet | 109 page_set = page_sets.PartialInvalidationCasesPageSet |
| 112 | 110 |
| 113 @classmethod | 111 @classmethod |
| 114 def Name(cls): | 112 def Name(cls): |
| 115 return 'rasterize_and_record_micro.partial_invalidation' | 113 return 'rasterize_and_record_micro.partial_invalidation' |
| 116 | 114 |
| 117 | 115 |
| 118 # Disabled because we do not plan on running CT benchmarks on the perf | |
| 119 # waterfall any time soon. | |
| 120 @benchmark.Disabled('all') | |
| 121 class RasterizeAndRecordMicroCT(_RasterizeAndRecordMicro): | |
| 122 """Measures rasterize and record performance for Cluster Telemetry.""" | |
| 123 | |
| 124 @classmethod | |
| 125 def Name(cls): | |
| 126 return 'rasterize_and_record_micro_ct' | |
| 127 | |
| 128 @classmethod | |
| 129 def AddBenchmarkCommandLineArgs(cls, parser): | |
| 130 _RasterizeAndRecordMicro.AddBenchmarkCommandLineArgs(parser) | |
| 131 ct_benchmarks_util.AddBenchmarkCommandLineArgs(parser) | |
| 132 | |
| 133 @classmethod | |
| 134 def ProcessCommandLineArgs(cls, parser, args): | |
| 135 ct_benchmarks_util.ValidateCommandLineArgs(parser, args) | |
| 136 | |
| 137 def CreateStorySet(self, options): | |
| 138 return page_sets.CTPageSet( | |
| 139 options.urls_list, options.user_agent, options.archive_data_file, | |
| 140 run_page_interaction_callback=repaint_helpers.WaitThenRepaint) | |
| OLD | NEW |