Chromium Code Reviews| 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 from measurements import rasterize_and_record_micro | 7 from measurements import rasterize_and_record_micro |
| 8 import page_sets | 8 import page_sets |
| 9 from telemetry import benchmark | 9 from telemetry import benchmark |
| 10 | 10 |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 88 """Measures rasterize and record performance on the Polymer cases. | 88 """Measures rasterize and record performance on the Polymer cases. |
| 89 | 89 |
| 90 http://www.chromium.org/developers/design-documents/rendering-benchmarks""" | 90 http://www.chromium.org/developers/design-documents/rendering-benchmarks""" |
| 91 | 91 |
| 92 @classmethod | 92 @classmethod |
| 93 def Name(cls): | 93 def Name(cls): |
| 94 return 'rasterize_and_record_micro.polymer' | 94 return 'rasterize_and_record_micro.polymer' |
| 95 | 95 |
| 96 def CreateStorySet(self, options): | 96 def CreateStorySet(self, options): |
| 97 return page_sets.PolymerPageSet(run_no_page_interactions=True) | 97 return page_sets.PolymerPageSet(run_no_page_interactions=True) |
| 98 | |
| 99 | |
| 100 @benchmark.Disabled | |
| 101 class RasterizeAndRecordMicroCT(_RasterizeAndRecordMicro): | |
| 102 """Measures rasterize and record performance for Cluster Telemetry.""" | |
| 103 | |
| 104 @classmethod | |
| 105 def Name(cls): | |
| 106 return 'rasterize_and_record_micro_ct' | |
| 107 | |
| 108 @classmethod | |
| 109 def AddBenchmarkCommandLineArgs(cls, parser): | |
|
nednguyen
2015/10/15 12:51:19
Since this logic is the same for the three benchma
rmistry
2015/10/15 13:24:32
Done.
| |
| 110 _RasterizeAndRecordMicro.AddBenchmarkCommandLineArgs(parser) | |
| 111 parser.add_option('--user-agent', action='store', type='string', | |
| 112 default=None, help='Options are mobile and desktop.') | |
| 113 parser.add_option('--archive-data-file', action='store', type='string', | |
| 114 default=None, | |
| 115 help='The location of the WPR JSON archive file.') | |
| 116 parser.add_option('--urls-list', action='store', type='string', | |
| 117 default=None, | |
| 118 help='This is a comma separated list of urls. ' | |
| 119 'Eg: http://www.google.com,http://www.gmail.com') | |
| 120 | |
| 121 @classmethod | |
| 122 def ProcessCommandLineArgs(cls, parser, args): | |
|
nednguyen
2015/10/15 12:51:19
Same for this.
ct_benchmarks_util.ValidateComman
rmistry
2015/10/15 13:24:32
Done.
| |
| 123 if not args.user_agent: | |
| 124 parser.error('Please specify --user_agent.') | |
| 125 if not args.archive_data_file: | |
| 126 parser.error('Please specify --archive_data_file.') | |
| 127 if not args.urls_list: | |
| 128 parser.error('Please specify --urls_list.') | |
| 129 | |
| 130 def CreateStorySet(self, options): | |
| 131 return page_sets.CTPageSet( | |
| 132 options.urls_list, options.user_agent, options.archive_data_file) | |
| OLD | NEW |