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

Unified Diff: tools/perf/profile_creators/small_profile_creator.py

Issue 980073005: Move PageTest.ValidatePageSet special-case into profile creator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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/measurements/session_restore.py ('k') | tools/telemetry/telemetry/page/page_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/profile_creators/small_profile_creator.py
diff --git a/tools/perf/profile_creators/small_profile_creator.py b/tools/perf/profile_creators/small_profile_creator.py
index 46109a7a4f341a536c73cb5e47498f07a2c37085..a63cca894fdc75d5831a729e52116232c030288c 100644
--- a/tools/perf/profile_creators/small_profile_creator.py
+++ b/tools/perf/profile_creators/small_profile_creator.py
@@ -24,11 +24,21 @@ class SmallProfileCreator(profile_creator.ProfileCreator):
def __init__(self):
super(SmallProfileCreator.PageTest, self).__init__()
self._page_set = page_sets.Typical25PageSet()
+ self._ValidatePageSet(self._page_set)
# Open all links in the same tab save for the last _NUM_TABS links which
# are each opened in a new tab.
self._NUM_TABS = 5
+ @staticmethod
+ def _ValidatePageSet(page_set):
+ """Raise an exception if |page_set| uses more than one WPR archive."""
+ wpr_paths = set(page_set.WprFilePathForUserStory(p)
+ for p in page_set if not p.is_local)
+ if len(wpr_paths) > 1:
+ raise Exception("Invalid page set: has multiple WPR archives: %s" %
+ ','.join(sorted(wpr_paths)))
+
def TabForPage(self, page, browser):
"""Superclass override."""
idx = page.page_set.pages.index(page)
« no previous file with comments | « tools/perf/measurements/session_restore.py ('k') | tools/telemetry/telemetry/page/page_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698