Chromium Code Reviews| Index: tools/perf/benchmarks/rasterize_and_record_micro.py |
| diff --git a/tools/perf/benchmarks/rasterize_and_record_micro.py b/tools/perf/benchmarks/rasterize_and_record_micro.py |
| index 9a5ababf4d34e1252feed93313e8001a57e20653..0f6d79cc891250b60b88c5283c50812995684ce0 100644 |
| --- a/tools/perf/benchmarks/rasterize_and_record_micro.py |
| +++ b/tools/perf/benchmarks/rasterize_and_record_micro.py |
| @@ -2,6 +2,7 @@ |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| +from benchmarks import skpicture_printer |
| from core import perf_benchmark |
| from measurements import rasterize_and_record_micro |
| @@ -31,6 +32,10 @@ class _RasterizeAndRecordMicro(perf_benchmark.PerfBenchmark): |
| parser.add_option('--report-detailed-results', |
| action='store_true', |
| help='Whether to report additional detailed results.') |
| + parser.add_option('--page-set-name', action='store', type='string', |
| + default=None) |
| + parser.add_option('--page-set-base-dir', action='store', type='string', |
| + default=None) |
| @classmethod |
| def Name(cls): |
| @@ -95,3 +100,24 @@ class RasterizeAndRecordMicroPolymer(_RasterizeAndRecordMicro): |
| def CreateStorySet(self, options): |
| return page_sets.PolymerPageSet(run_no_page_interactions=True) |
| + |
| + |
| +@benchmark.Disabled |
| +class RasterizeAndRecordMicroCustomPageSet(_RasterizeAndRecordMicro): |
| + """Measures rasterize and record performance on a custom page set.""" |
| + |
| + @classmethod |
| + def Name(cls): |
| + return 'rasterize_and_record_micro.custom' |
| + |
| + @classmethod |
| + def ProcessCommandLineArgs(cls, parser, args): |
| + if not args.page_set_name: |
| + parser.error('Please specify --page-set-name') |
| + if not args.page_set_base_dir: |
| + parser.error('Please specify --page-set-base-dir') |
| + |
| + def CreateStorySet(self, options): |
| + page_set_class = skpicture_printer.MatchPageSetName( |
| + options.page_set_name, options.page_set_base_dir) |
| + return page_set_class() |
|
nednguyen
2015/10/07 17:42:25
This restrict yourself to only be able to create p
|