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

Side by Side Diff: tools/perf/measurements/repaint.py

Issue 641823004: telemetry: Allow page tests to be configured via constructor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: Add debug output to figure out why pixel tests fail on bots. Created 6 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
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 measurements import smoothness_controller 5 from measurements import smoothness_controller
6 from telemetry.page import page_test 6 from telemetry.page import page_test
7 7
8 8
9 class Repaint(page_test.PageTest): 9 class Repaint(page_test.PageTest):
10 def __init__(self): 10 def __init__(self):
11 super(Repaint, self).__init__('RunRepaint', False) 11 super(Repaint, self).__init__('RunRepaint', False)
12 self._smoothness_controller = None 12 self._smoothness_controller = None
13 self._micro_benchmark_id = None 13 self._micro_benchmark_id = None
14 14
15 @classmethod 15 def AddCommandLineArgs(self, parser):
16 def AddCommandLineArgs(cls, parser):
17 parser.add_option('--mode', type='string', 16 parser.add_option('--mode', type='string',
18 default='viewport', 17 default='viewport',
19 help='Invalidation mode. ' 18 help='Invalidation mode. '
20 'Supported values: fixed_size, layer, random, viewport.') 19 'Supported values: fixed_size, layer, random, viewport.')
21 parser.add_option('--width', type='int', 20 parser.add_option('--width', type='int',
22 default=None, 21 default=None,
23 help='Width of invalidations for fixed_size mode.') 22 help='Width of invalidations for fixed_size mode.')
24 parser.add_option('--height', type='int', 23 parser.add_option('--height', type='int',
25 default=None, 24 default=None,
26 help='Height of invalidations for fixed_size mode.') 25 help='Height of invalidations for fixed_size mode.')
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 "notify_done": true 72 "notify_done": true
74 }); 73 });
75 """) 74 """)
76 self._smoothness_controller.Stop(tab) 75 self._smoothness_controller.Stop(tab)
77 76
78 def ValidateAndMeasurePage(self, page, tab, results): 77 def ValidateAndMeasurePage(self, page, tab, results):
79 self._smoothness_controller.AddResults(tab, results) 78 self._smoothness_controller.AddResults(tab, results)
80 79
81 def CleanUpAfterPage(self, _, tab): 80 def CleanUpAfterPage(self, _, tab):
82 self._smoothness_controller.CleanUp(tab) 81 self._smoothness_controller.CleanUp(tab)
OLDNEW
« no previous file with comments | « tools/perf/measurements/rasterize_and_record_micro.py ('k') | tools/perf/measurements/screenshot.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698