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

Unified Diff: tools/perf/measurements/repaint.py

Issue 737403002: Revert of telemetry: Remove command line args from page test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/perf/measurements/record_per_area.py ('k') | tools/perf/measurements/screenshot.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/measurements/repaint.py
diff --git a/tools/perf/measurements/repaint.py b/tools/perf/measurements/repaint.py
index 07360517b90969cc8f2c7d7d358d90ee73e24a7f..a56ccb84051cc2514a45096f1112b828b3949cd4 100644
--- a/tools/perf/measurements/repaint.py
+++ b/tools/perf/measurements/repaint.py
@@ -7,13 +7,23 @@
class Repaint(page_test.PageTest):
- def __init__(self, mode='viewport', width=None, height=None):
+ def __init__(self):
super(Repaint, self).__init__('RunRepaint', False)
self._smoothness_controller = None
self._micro_benchmark_id = None
- self._mode = mode
- self._width = width
- self._height = height
+
+ @classmethod
+ def AddCommandLineArgs(cls, parser):
+ parser.add_option('--mode', type='string',
+ default='viewport',
+ help='Invalidation mode. '
+ 'Supported values: fixed_size, layer, random, viewport.')
+ parser.add_option('--width', type='int',
+ default=None,
+ help='Width of invalidations for fixed_size mode.')
+ parser.add_option('--height', type='int',
+ default=None,
+ help='Height of invalidations for fixed_size mode.')
def CustomizeBrowserOptions(self, options):
options.AppendExtraBrowserArgs([
@@ -32,11 +42,11 @@
'chrome.gpuBenchmarking.setRasterizeOnlyVisibleContent();')
args = {}
- args['mode'] = self._mode
- if self._width:
- args['width'] = self._width
- if self._height:
- args['height'] = self._height
+ args['mode'] = self.options.mode
+ if self.options.width:
+ args['width'] = self.options.width
+ if self.options.height:
+ args['height'] = self.options.height
# Enque benchmark
tab.ExecuteJavaScript("""
« no previous file with comments | « tools/perf/measurements/record_per_area.py ('k') | tools/perf/measurements/screenshot.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698