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

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

Issue 1428133005: [Telemetry] Allows concatenating multiple Disabled & Enabled decorators (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Dave's comment Created 5 years, 1 month 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
« no previous file with comments | « tools/perf/benchmarks/repaint.py ('k') | tools/perf/benchmarks/tab_switching.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 import ct_benchmarks_util 7 import ct_benchmarks_util
8 import page_sets 8 import page_sets
9 from telemetry import benchmark 9 from telemetry import benchmark
10 from telemetry.core import discover 10 from telemetry.core import discover
11 from telemetry import story 11 from telemetry import story
12 12
13 from measurements import skpicture_printer 13 from measurements import skpicture_printer
14 14
15 15
16 def _MatchPageSetName(story_set_name, story_set_base_dir): 16 def _MatchPageSetName(story_set_name, story_set_base_dir):
17 story_sets = discover.DiscoverClasses(story_set_base_dir, story_set_base_dir, 17 story_sets = discover.DiscoverClasses(story_set_base_dir, story_set_base_dir,
18 story.StorySet).values() 18 story.StorySet).values()
19 for s in story_sets: 19 for s in story_sets:
20 if story_set_name == s.Name(): 20 if story_set_name == s.Name():
21 return s 21 return s
22 return None 22 return None
23 23
24 24
25 @benchmark.Disabled 25 @benchmark.Disabled('all')
26 class SkpicturePrinter(perf_benchmark.PerfBenchmark): 26 class SkpicturePrinter(perf_benchmark.PerfBenchmark):
27 @classmethod 27 @classmethod
28 def AddBenchmarkCommandLineArgs(cls, parser): 28 def AddBenchmarkCommandLineArgs(cls, parser):
29 parser.add_option('--page-set-name', action='store', type='string') 29 parser.add_option('--page-set-name', action='store', type='string')
30 parser.add_option('--page-set-base-dir', action='store', type='string') 30 parser.add_option('--page-set-base-dir', action='store', type='string')
31 parser.add_option('-s', '--skp-outdir', 31 parser.add_option('-s', '--skp-outdir',
32 help='Output directory for the SKP files') 32 help='Output directory for the SKP files')
33 @classmethod 33 @classmethod
34 def ProcessCommandLineArgs(cls, parser, args): 34 def ProcessCommandLineArgs(cls, parser, args):
35 if not args.page_set_name: 35 if not args.page_set_name:
(...skipping 11 matching lines...) Expand all
47 return skpicture_printer.SkpicturePrinter(options.skp_outdir) 47 return skpicture_printer.SkpicturePrinter(options.skp_outdir)
48 48
49 def CreateStorySet(self, options): 49 def CreateStorySet(self, options):
50 story_set_class = _MatchPageSetName(options.page_set_name, 50 story_set_class = _MatchPageSetName(options.page_set_name,
51 options.page_set_base_dir) 51 options.page_set_base_dir)
52 return story_set_class() 52 return story_set_class()
53 53
54 54
55 # Disabled because we do not plan on running CT benchmarks on the perf 55 # Disabled because we do not plan on running CT benchmarks on the perf
56 # waterfall any time soon. 56 # waterfall any time soon.
57 @benchmark.Disabled 57 @benchmark.Disabled('all')
58 class SkpicturePrinterCT(perf_benchmark.PerfBenchmark): 58 class SkpicturePrinterCT(perf_benchmark.PerfBenchmark):
59 """Captures SKPs for Cluster Telemetry.""" 59 """Captures SKPs for Cluster Telemetry."""
60 60
61 @classmethod 61 @classmethod
62 def Name(cls): 62 def Name(cls):
63 return 'skpicture_printer_ct' 63 return 'skpicture_printer_ct'
64 64
65 @classmethod 65 @classmethod
66 def AddBenchmarkCommandLineArgs(cls, parser): 66 def AddBenchmarkCommandLineArgs(cls, parser):
67 ct_benchmarks_util.AddBenchmarkCommandLineArgs(parser) 67 ct_benchmarks_util.AddBenchmarkCommandLineArgs(parser)
68 parser.add_option('-s', '--skp-outdir', 68 parser.add_option('-s', '--skp-outdir',
69 default=None, 69 default=None,
70 help='Output directory for the SKP files') 70 help='Output directory for the SKP files')
71 71
72 @classmethod 72 @classmethod
73 def ProcessCommandLineArgs(cls, parser, args): 73 def ProcessCommandLineArgs(cls, parser, args):
74 ct_benchmarks_util.ValidateCommandLineArgs(parser, args) 74 ct_benchmarks_util.ValidateCommandLineArgs(parser, args)
75 75
76 def CreatePageTest(self, options): 76 def CreatePageTest(self, options):
77 return skpicture_printer.SkpicturePrinter(options.skp_outdir) 77 return skpicture_printer.SkpicturePrinter(options.skp_outdir)
78 78
79 def CreateStorySet(self, options): 79 def CreateStorySet(self, options):
80 return page_sets.CTPageSet( 80 return page_sets.CTPageSet(
81 options.urls_list, options.user_agent, options.archive_data_file) 81 options.urls_list, options.user_agent, options.archive_data_file)
OLDNEW
« no previous file with comments | « tools/perf/benchmarks/repaint.py ('k') | tools/perf/benchmarks/tab_switching.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698