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

Unified Diff: tools/perf/page_sets/top_25_repaint.py

Issue 1098543002: CL for perf tryjob on android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/perf/page_sets/repaint_helpers.py ('k') | tools/run-perf-test.cfg » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/page_sets/top_25_repaint.py
diff --git a/tools/perf/page_sets/top_25_repaint.py b/tools/perf/page_sets/top_25_repaint.py
index 24a36d6aec36cf8333ecfe4a8497df2a8e0a82c5..d3f2b9bcdb928e54fd1f4813bbb9dc3db0dac653 100644
--- a/tools/perf/page_sets/top_25_repaint.py
+++ b/tools/perf/page_sets/top_25_repaint.py
@@ -5,27 +5,35 @@ from telemetry.page import page as page_module
from telemetry.page import page_set as page_set_module
from page_sets import top_pages
+from page_sets import repaint_helpers
class TopRepaintPage(page_module.Page):
- def __init__(self, url, page_set, name='', credentials=None):
+ def __init__(self, url, page_set, mode, width, height, name='',
+ credentials=None):
super(TopRepaintPage, self).__init__(
url=url, page_set=page_set, name=name,
credentials_path='data/credentials.json')
self.user_agent_type = 'desktop'
self.archive_data_file = 'data/top_25_repaint.json'
self.credentials = credentials
+ self._mode = mode
+ self._width = width
+ self._height = height
def RunPageInteractions(self, action_runner):
- action_runner.RepaintContinuously(seconds=5)
+ repaint_helpers.Repaint(
+ action_runner, mode=self._mode, width=self._width, height=self._height)
-def _CreatePageClassWithRepaintInteractions(page_cls):
+def _CreatePageClassWithRepaintInteractions(page_cls, mode, width, height):
class DerivedRepaintPage(page_cls): # pylint: disable=W0232
def RunPageInteractions(self, action_runner):
- action_runner.RepaintContinuously(seconds=5)
+ repaint_helpers.Repaint(
+ action_runner, mode=mode, width=width, height=height)
+
return DerivedRepaintPage
@@ -33,7 +41,7 @@ class Top25RepaintPageSet(page_set_module.PageSet):
""" Pages hand-picked for 2012 CrOS scrolling tuning efforts. """
- def __init__(self):
+ def __init__(self, mode='viewport', width=None, height=None):
super(Top25RepaintPageSet, self).__init__(
user_agent_type='desktop',
archive_data_file='data/top_25_repaint.json',
@@ -60,7 +68,8 @@ class Top25RepaintPageSet(page_set_module.PageSet):
]
for cl in top_page_classes:
- self.AddUserStory(_CreatePageClassWithRepaintInteractions(cl)(self))
+ self.AddUserStory(_CreatePageClassWithRepaintInteractions(
+ cl, mode=mode, width=width, height=height)(self))
other_urls = [
# Why: #1 news worldwide (Alexa global)
@@ -83,4 +92,5 @@ class Top25RepaintPageSet(page_set_module.PageSet):
]
for url in other_urls:
- self.AddUserStory(TopRepaintPage(url, self))
+ self.AddUserStory(
+ TopRepaintPage(url, self, mode=mode, height=height, width=width))
« no previous file with comments | « tools/perf/page_sets/repaint_helpers.py ('k') | tools/run-perf-test.cfg » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698