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

Side by Side Diff: ct/py/benchmarks/skpicture_printer.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 2014 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/ skpicture_printer.py
7 # and modified locally to support CT pagesets. Hopefully one day this file
8 # will live in telemetry codebase instead.
9
10 from measurements import skpicture_printer
11 from telemetry import benchmark
12 from telemetry import story
13 from telemetry.core import discover
14
15
16 def _MatchPageSetName(story_set_name, story_set_base_dir):
17 story_sets = discover.DiscoverClasses(story_set_base_dir, story_set_base_dir,
18 story.StorySet).values()
19 for s in story_sets:
20 if story_set_name == s.Name():
21 return s
22 return None
23
24
25 @benchmark.Disabled
26 class SkpicturePrinter(benchmark.Benchmark):
27 @classmethod
28 def AddBenchmarkCommandLineArgs(cls, parser):
29 parser.add_option('--page-set-name', action='store', type='string')
30 parser.add_option('--page-set-base-dir', action='store', type='string')
31 parser.add_option('-s', '--skp-outdir',
32 help='Output directory for the SKP files')
33 @classmethod
34 def ProcessCommandLineArgs(cls, parser, args):
35 if not args.page_set_name:
36 parser.error('Please specify --page-set-name')
37 if not args.page_set_base_dir:
38 parser.error('Please specify --page-set-base-dir')
39 if not args.skp_outdir:
40 parser.error('Please specify --skp-outdir')
41
42 def CreatePageTest(self, options):
43 return skpicture_printer.SkpicturePrinter(options.skp_outdir)
44
45 def CreateStorySet(self, options):
46 story_set_class = _MatchPageSetName(options.page_set_name,
47 options.page_set_base_dir)
48 return story_set_class()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698