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

Side by Side Diff: tools/perf/benchmarks/skpicture_printer.py

Issue 1244223002: Create classes_util API, change discover to return a list instead of a dict. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 4 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
1 # Copyright 2014 The Chromium Authors. All rights reserved. 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 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 telemetry import benchmark 7 from telemetry import benchmark
8 from telemetry.core import discover
9 from telemetry import story 8 from telemetry import story
9 from telemetry.util import classes_util
10 10
11 from measurements import skpicture_printer 11 from measurements import skpicture_printer
12 12
13 13
14 def _MatchPageSetName(story_set_name, story_set_base_dir): 14 def _MatchPageSetName(story_set_name, story_set_base_dir):
15 story_sets = discover.DiscoverClasses(story_set_base_dir, story_set_base_dir, 15 story_sets = classes_util.DiscoverClasses(
16 story.StorySet).values() 16 story_set_base_dir, story_set_base_dir, story.StorySet)
17 for s in story_sets: 17 for s in story_sets:
18 if story_set_name == s.Name(): 18 if story_set_name == s.Name():
19 return s 19 return s
20 return None 20 return None
21 21
22 22
23 @benchmark.Disabled 23 @benchmark.Disabled
24 class SkpicturePrinter(perf_benchmark.PerfBenchmark): 24 class SkpicturePrinter(perf_benchmark.PerfBenchmark):
25 @classmethod 25 @classmethod
26 def AddBenchmarkCommandLineArgs(cls, parser): 26 def AddBenchmarkCommandLineArgs(cls, parser):
(...skipping 14 matching lines...) Expand all
41 def Name(cls): 41 def Name(cls):
42 return 'skpicture_printer' 42 return 'skpicture_printer'
43 43
44 def CreatePageTest(self, options): 44 def CreatePageTest(self, options):
45 return skpicture_printer.SkpicturePrinter(options.skp_outdir) 45 return skpicture_printer.SkpicturePrinter(options.skp_outdir)
46 46
47 def CreateStorySet(self, options): 47 def CreateStorySet(self, options):
48 story_set_class = _MatchPageSetName(options.page_set_name, 48 story_set_class = _MatchPageSetName(options.page_set_name,
49 options.page_set_base_dir) 49 options.page_set_base_dir)
50 return story_set_class() 50 return story_set_class()
OLDNEW
« no previous file with comments | « tools/perf/benchmarks/benchmark_unittest.py ('k') | tools/perf/measurements/measurement_smoke_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698