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

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

Issue 637153002: telemetry: Remove command line args from page test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Suppress pylint E1003 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
Index: tools/perf/benchmarks/repaint.py
diff --git a/tools/perf/benchmarks/repaint.py b/tools/perf/benchmarks/repaint.py
index 0b41f4c576978283bc6d71ba61e3056e7a669273..df9a1bb939dab78cdf54c785bd8f13ac05a97762 100644
--- a/tools/perf/benchmarks/repaint.py
+++ b/tools/perf/benchmarks/repaint.py
@@ -3,28 +3,44 @@
# found in the LICENSE file.
from benchmarks import silk_flags
-from measurements import repaint
+from measurements import repaint as repaint_measurement
import page_sets
from telemetry import benchmark
+class _Repaint(benchmark.Benchmark):
+ @classmethod
+ def AddBenchmarkCommandLineArgs(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 CreatePageTest(self, options):
+ return repaint_measurement.Repaint(options.mode, options.width,
+ options.height)
+
@benchmark.Enabled('android')
-class RepaintKeyMobileSites(benchmark.Benchmark):
+class RepaintKeyMobileSites(_Repaint):
"""Measures repaint performance on the key mobile sites.
http://www.chromium.org/developers/design-documents/rendering-benchmarks"""
- test = repaint.Repaint
page_set = page_sets.KeyMobileSitesPageSet
@benchmark.Enabled('android')
-class RepaintGpuRasterizationKeyMobileSites(benchmark.Benchmark):
+class RepaintGpuRasterizationKeyMobileSites(_Repaint):
"""Measures repaint performance on the key mobile sites with forced GPU
rasterization.
http://www.chromium.org/developers/design-documents/rendering-benchmarks"""
tag = 'gpu_rasterization'
- test = repaint.Repaint
page_set = page_sets.KeyMobileSitesPageSet
def CustomizeBrowserOptions(self, options):
silk_flags.CustomizeBrowserOptionsForGpuRasterization(options)

Powered by Google App Engine
This is Rietveld 408576698