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

Unified Diff: tools/perf/page_sets/system_health/multi_tab_stories.py

Issue 2819423002: Support flag --tabset-repeat on benchmark tab_switching (Closed)
Patch Set: fixing style Created 3 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/benchmarks/tab_switching.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/page_sets/system_health/multi_tab_stories.py
diff --git a/tools/perf/page_sets/system_health/multi_tab_stories.py b/tools/perf/page_sets/system_health/multi_tab_stories.py
index a9ab0c741024d2fa37508cdd7157ea010c4e384d..fef84864803af69a5d665d5edceac6e569f7df4b 100644
--- a/tools/perf/page_sets/system_health/multi_tab_stories.py
+++ b/tools/perf/page_sets/system_health/multi_tab_stories.py
@@ -15,18 +15,23 @@ from telemetry import benchmark
class MultiTabStory(system_health_story.SystemHealthStory):
ABSTRACT_STORY = True
+ def __init__(self, story_set, take_memory_measurement, tabset_repeat=1):
+ super(MultiTabStory, self).__init__(story_set, take_memory_measurement)
+ self._tabset_repeat = tabset_repeat
+
def RunNavigateSteps(self, action_runner):
tabs = action_runner.tab.browser.tabs
# No need to create the first tab as there is already one
# when the browser is ready,
- if self.URL_LIST:
- action_runner.Navigate(self.URL_LIST[0])
- for url in self.URL_LIST[1:]:
+ url_list = self.URL_LIST * self._tabset_repeat
+ if url_list:
+ action_runner.Navigate(url_list[0])
+ for url in url_list[1:]:
new_tab = tabs.New()
new_tab.action_runner.Navigate(url)
- for i, url in enumerate(self.URL_LIST):
+ for i, url in enumerate(url_list):
try:
tabs[i].action_runner.WaitForNetworkQuiescence()
except py_utils.TimeoutException:
« no previous file with comments | « tools/perf/benchmarks/tab_switching.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698