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

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

Issue 1915163003: Revert of Set up a parallel memory.memory_health_quick_tbmv2 benchmark (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/memory_infra.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/memory_health_story.py
diff --git a/tools/perf/page_sets/memory_health_story.py b/tools/perf/page_sets/memory_health_story.py
index 0bd52362c1885115c93e370c53db58a14d0a41b7..e9e912d9876e375428459f544db7110017c31929 100644
--- a/tools/perf/page_sets/memory_health_story.py
+++ b/tools/perf/page_sets/memory_health_story.py
@@ -29,20 +29,17 @@
]
-class MemoryHealthPage(page_module.Page):
- """Abstract page class for measuring memory."""
-
- _PHASE = NotImplemented
+class ForegroundPage(page_module.Page):
+ """Take a measurement after loading a regular webpage."""
def __init__(self, story_set, name, url):
- super(MemoryHealthPage, self).__init__(
- page_set=story_set, name=name, url=url,
- shared_page_state_class=shared_page_state.SharedMobilePageState,
- grouping_keys={'phase': self._PHASE})
+ super(ForegroundPage, self).__init__(
+ url=url, page_set=story_set, name=name,
+ shared_page_state_class=shared_page_state.SharedMobilePageState)
- def _TakeMemoryMeasurement(self, action_runner):
+ def _TakeMemoryMeasurement(self, action_runner, phase):
action_runner.Wait(1) # See crbug.com/540022#c17.
- with action_runner.CreateInteraction(self._PHASE):
+ with action_runner.CreateInteraction(phase):
action_runner.Wait(DUMP_WAIT_TIME)
action_runner.ForceGarbageCollection()
action_runner.tab.browser.platform.FlushEntireSystemCache()
@@ -50,24 +47,13 @@
if not action_runner.tab.browser.DumpMemory():
logging.error('Unable to get a memory dump for %s.', self.name)
-
-class ForegroundPage(MemoryHealthPage):
- """Take a measurement after loading a regular webpage."""
-
- _PHASE = 'foreground'
-
- def __init__(self, story_set, name, url):
- super(ForegroundPage, self).__init__(story_set, name, url)
-
def RunPageInteractions(self, action_runner):
action_runner.tab.WaitForDocumentReadyStateToBeComplete()
- self._TakeMemoryMeasurement(action_runner)
+ self._TakeMemoryMeasurement(action_runner, 'foreground')
-class BackgroundPage(MemoryHealthPage):
+class BackgroundPage(ForegroundPage):
"""Take a measurement while Chrome is in the background."""
-
- _PHASE = 'background'
def __init__(self, story_set, name):
super(BackgroundPage, self).__init__(story_set, name, 'about:blank')
@@ -83,7 +69,7 @@
app_has_webviews=False)
# Take measurement.
- self._TakeMemoryMeasurement(action_runner)
+ self._TakeMemoryMeasurement(action_runner, 'background')
# Go back to Chrome.
android_platform.android_action_runner.InputKeyEvent(keyevent.KEYCODE_BACK)
« no previous file with comments | « tools/perf/benchmarks/memory_infra.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698