| 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 | 7 import ct_benchmarks_util |
| 8 from measurements import rasterize_and_record_micro | 8 from measurements import rasterize_and_record_micro |
| 9 import page_sets | 9 import page_sets |
| 10 from page_sets import repaint_helpers | 10 from page_sets import repaint_helpers |
| 11 from telemetry import benchmark | 11 from telemetry import benchmark |
| 12 | 12 |
| 13 | 13 |
| 14 class _RasterizeAndRecordMicro(perf_benchmark.PerfBenchmark): | 14 class _RasterizeAndRecordMicro(perf_benchmark.PerfBenchmark): |
| 15 | 15 |
| 16 @classmethod | 16 @classmethod |
| 17 def AddBenchmarkCommandLineArgs(cls, parser): | 17 def AddBenchmarkCommandLineArgs(cls, parser): |
| 18 parser.add_option('--start-wait-time', type='float', | 18 parser.add_option('--start-wait-time', type='float', |
| 19 default=2, | 19 default=2, |
| 20 help='Wait time before the benchmark is started ' | 20 help='Wait time before the benchmark is started ' |
| 21 '(must be long enough to load all content)') | 21 '(must be long enough to load all content)') |
| 22 parser.add_option('--rasterize-repeat', type='int', | 22 parser.add_option('--rasterize-repeat', type='int', |
| 23 default=100, | 23 default=1, |
| 24 help='Repeat each raster this many times. Increase ' | 24 help='Repeat each raster this many times. Increase ' |
| 25 'this value to reduce variance.') | 25 'this value to reduce variance.') |
| 26 parser.add_option('--record-repeat', type='int', | 26 parser.add_option('--record-repeat', type='int', |
| 27 default=100, | 27 default=1, |
| 28 help='Repeat each record this many times. Increase ' | 28 help='Repeat each record this many times. Increase ' |
| 29 'this value to reduce variance.') | 29 'this value to reduce variance.') |
| 30 parser.add_option('--timeout', type='int', | 30 parser.add_option('--timeout', type='int', |
| 31 default=120, | 31 default=120, |
| 32 help='The length of time to wait for the micro ' | 32 help='The length of time to wait for the micro ' |
| 33 'benchmark to finish, expressed in seconds.') | 33 'benchmark to finish, expressed in seconds.') |
| 34 parser.add_option('--report-detailed-results', | 34 parser.add_option('--report-detailed-results', |
| 35 action='store_true', | 35 action='store_true', |
| 36 help='Whether to report additional detailed results.') | 36 help='Whether to report additional detailed results.') |
| 37 | 37 |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 ct_benchmarks_util.AddBenchmarkCommandLineArgs(parser) | 131 ct_benchmarks_util.AddBenchmarkCommandLineArgs(parser) |
| 132 | 132 |
| 133 @classmethod | 133 @classmethod |
| 134 def ProcessCommandLineArgs(cls, parser, args): | 134 def ProcessCommandLineArgs(cls, parser, args): |
| 135 ct_benchmarks_util.ValidateCommandLineArgs(parser, args) | 135 ct_benchmarks_util.ValidateCommandLineArgs(parser, args) |
| 136 | 136 |
| 137 def CreateStorySet(self, options): | 137 def CreateStorySet(self, options): |
| 138 return page_sets.CTPageSet( | 138 return page_sets.CTPageSet( |
| 139 options.urls_list, options.user_agent, options.archive_data_file, | 139 options.urls_list, options.user_agent, options.archive_data_file, |
| 140 run_page_interaction_callback=repaint_helpers.WaitThenRepaint) | 140 run_page_interaction_callback=repaint_helpers.WaitThenRepaint) |
| OLD | NEW |