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

Side by Side Diff: tools/perf/contrib/cluster_telemetry/repaint.py

Issue 2876073003: Migrate cluster telemetry benchmarks to tools/perf/contrib/cluster_telemetry/ (Closed)
Patch Set: Remove BENCHMARKS_BLACK_LIST Created 3 years, 7 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 contrib.cluster_telemetry import ct_benchmarks_util
6 from contrib.cluster_telemetry import page_set
wkorman 2017/05/12 17:44:23 why rename to singular? Just curious.
nednguyen 2017/05/12 20:17:03 Ah, back then page_sets mean to refer to https://c
7 from contrib.cluster_telemetry import repaint_helpers
8
5 from core import perf_benchmark 9 from core import perf_benchmark
6
7 import ct_benchmarks_util
8 from measurements import smoothness 10 from measurements import smoothness
9 11
10 import page_sets
11 from page_sets import repaint_helpers
12 12
13 from telemetry import benchmark
14
15 # Disabled because we do not plan on running CT benchmarks on the perf
16 # waterfall any time soon.
17 @benchmark.Disabled('all')
18 class RepaintCT(perf_benchmark.PerfBenchmark): 13 class RepaintCT(perf_benchmark.PerfBenchmark):
19 """Measures repaint performance for Cluster Telemetry.""" 14 """Measures repaint performance for Cluster Telemetry."""
20 15
21 @classmethod 16 @classmethod
22 def Name(cls): 17 def Name(cls):
23 return 'repaint_ct' 18 return 'repaint_ct'
24 19
25 @classmethod 20 @classmethod
26 def AddBenchmarkCommandLineArgs(cls, parser): 21 def AddBenchmarkCommandLineArgs(cls, parser):
27 parser.add_option('--mode', type='string', 22 parser.add_option('--mode', type='string',
28 default='viewport', 23 default='viewport',
29 help='Invalidation mode. ' 24 help='Invalidation mode. '
30 'Supported values: fixed_size, layer, random, viewport.') 25 'Supported values: fixed_size, layer, random, viewport.')
31 parser.add_option('--width', type='int', 26 parser.add_option('--width', type='int',
32 default=None, 27 default=None,
33 help='Width of invalidations for fixed_size mode.') 28 help='Width of invalidations for fixed_size mode.')
34 parser.add_option('--height', type='int', 29 parser.add_option('--height', type='int',
35 default=None, 30 default=None,
36 help='Height of invalidations for fixed_size mode.') 31 help='Height of invalidations for fixed_size mode.')
37 ct_benchmarks_util.AddBenchmarkCommandLineArgs(parser) 32 ct_benchmarks_util.AddBenchmarkCommandLineArgs(parser)
38 33
39 @classmethod 34 @classmethod
40 def ProcessCommandLineArgs(cls, parser, args): 35 def ProcessCommandLineArgs(cls, parser, args):
41 ct_benchmarks_util.ValidateCommandLineArgs(parser, args) 36 ct_benchmarks_util.ValidateCommandLineArgs(parser, args)
42 37
43 def CreateStorySet(self, options): 38 def CreateStorySet(self, options):
44 return page_sets.CTPageSet( 39 return page_set.CTPageSet(
45 options.urls_list, options.user_agent, options.archive_data_file, 40 options.urls_list, options.user_agent, options.archive_data_file,
46 run_page_interaction_callback=repaint_helpers.WaitThenRepaint) 41 run_page_interaction_callback=repaint_helpers.WaitThenRepaint)
47 42
48 def CreatePageTest(self, options): 43 def CreatePageTest(self, options):
49 return smoothness.Repaint() 44 return smoothness.Repaint()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698