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

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

Issue 2301653002: [BattOr] Add mac BattOr test for steady state cases. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: [BattOr] Add mac BattOr test for steady state cases. Created 4 years, 4 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/battor.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/idle_after_loading_stories.py
diff --git a/tools/perf/page_sets/idle_after_loading_stories.py b/tools/perf/page_sets/idle_after_loading_stories.py
index 35c56890b9bfa3efa4eb7cf89291159013c136b0..f4b1b89ff26e6521a73330a9dbdaadea581cc90a 100644
--- a/tools/perf/page_sets/idle_after_loading_stories.py
+++ b/tools/perf/page_sets/idle_after_loading_stories.py
@@ -5,17 +5,30 @@ from telemetry.page import page as page_module
from telemetry import story
+# TODO(rnephew): Move to seperate file and merge with mac_gpu_sites BasePage.
+class _BasePage(page_module.Page):
+ def __init__(self, page_set, url, wait_in_seconds):
+ super(_BasePage, self).__init__(url=url, page_set=page_set)
+ self._wait_in_seconds = wait_in_seconds
+
+ def RunPageInteractions(self, action_runner):
+ action_runner.Wait(self._wait_in_seconds)
+
+
class IdleAfterLoadingStories(story.StorySet):
"""Historically, Chrome has high CPU usage on these sites after the page has
loaded. These user stories let Chrome idle on the page."""
- def __init__(self):
+ def __init__(self, wait_in_seconds=0):
super(IdleAfterLoadingStories, self).__init__(
archive_data_file='data/idle_after_loading_stories.json',
cloud_storage_bucket=story.PARTNER_BUCKET)
# Chrome has high idle CPU usage on this site, even after its quiesced.
# https://crbug.com/638365.
- self.AddStory(page_module.Page(
+ urls = [
'http://www.labradortraininghq.com/labrador-training/how-to-crate-train'
- '-a-puppy/#How_Long_DoesIt_Take_To_Crate_Train_A_Puppy', page_set=self))
+ '-a-puppy/#How_Long_DoesIt_Take_To_Crate_Train_A_Puppy'
+ ]
+ for url in urls:
+ self.AddStory(_BasePage(self, url, wait_in_seconds))
« no previous file with comments | « tools/perf/benchmarks/battor.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698