Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(469)

Side by Side Diff: ct/py/benchmarks/rasterize_and_record_micro.py

Issue 1392173005: [CT] Update worker scripts to use new benchmarks and delete old benchmarks (Closed) Base URL: https://skia.googlesource.com/buildbot@master
Patch Set: Remove staging code Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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
3 # found in the LICENSE file.
4
5 # This file has been copied from
6 # https://chromium.googlesource.com/chromium/src/+/master/tools/perf/benchmarks/ rasterize_and_record_micro.py
7 # and modified locally to support CT pagesets. Hopefully one day this file
8 # will live in telemetry codebase instead.
9
10 from benchmarks import skpicture_printer
11 from measurements import rasterize_and_record_micro
12 import page_sets
13 from telemetry import benchmark
14
15
16 class _RasterizeAndRecordMicro(benchmark.Benchmark):
17 @classmethod
18 def AddBenchmarkCommandLineArgs(cls, parser):
19 parser.add_option('--start-wait-time', type='float',
20 default=2,
21 help='Wait time before the benchmark is started '
22 '(must be long enought to load all content)')
23 parser.add_option('--rasterize-repeat', type='int',
24 default=100,
25 help='Repeat each raster this many times. Increase '
26 'this value to reduce variance.')
27 parser.add_option('--record-repeat', type='int',
28 default=100,
29 help='Repeat each record this many times. Increase '
30 'this value to reduce variance.')
31 parser.add_option('--timeout', type='int',
32 default=120,
33 help='The length of time to wait for the micro '
34 'benchmark to finish, expressed in seconds.')
35 parser.add_option('--report-detailed-results',
36 action='store_true',
37 help='Whether to report additional detailed results.')
38 parser.add_option('--page-set-name', action='store', type='string')
39 parser.add_option('--page-set-base-dir', action='store', type='string')
40
41 def CreatePageTest(self, options):
42 return rasterize_and_record_micro.RasterizeAndRecordMicro(
43 options.start_wait_time, options.rasterize_repeat,
44 options.record_repeat, options.timeout, options.report_detailed_results)
45
46
47 @benchmark.Disabled
48 class RasterizeAndRecordMicroCTPages(_RasterizeAndRecordMicro):
49 test = rasterize_and_record_micro.RasterizeAndRecordMicro
50
51 @classmethod
52 def ProcessCommandLineArgs(cls, parser, args):
53 if not args.page_set_name:
54 parser.error('Please specify --page-set-name')
55 if not args.page_set_base_dir:
56 parser.error('Please specify --page-set-base-dir')
57
58 def CreateStorySet(self, options):
59 page_set_class = skpicture_printer._MatchPageSetName(
60 options.page_set_name, options.page_set_base_dir)
61 return page_set_class()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698