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

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

Issue 1658923004: PurgeMemory. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 | « third_party/WebKit/Source/web/WebMemoryPressureListener.cpp ('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/blink_memory_mobile.py
diff --git a/tools/perf/page_sets/blink_memory_mobile.py b/tools/perf/page_sets/blink_memory_mobile.py
index cec25c8a8758892a976744b8366569273175f7ca..083bf86951c124079644c51bf67c98a0540bc234 100644
--- a/tools/perf/page_sets/blink_memory_mobile.py
+++ b/tools/perf/page_sets/blink_memory_mobile.py
@@ -24,8 +24,19 @@ class BlinkMemoryMobilePage(page_module.Page):
def _DumpMemory(self, action_runner, phase):
with action_runner.CreateInteraction(phase):
+ # before
+ action_runner.Wait(DUMP_WAIT_TIME)
+ if not action_runner.tab.browser.DumpMemory():
+ logging.error('Unable to get a memory dump for %s.', self.name)
+ # after GC
action_runner.Wait(DUMP_WAIT_TIME)
action_runner.ForceGarbageCollection()
+ action_runner.Wait(DUMP_WAIT_TIME)
+ if not action_runner.tab.browser.DumpMemory():
+ logging.error('Unable to get a memory dump for %s.', self.name)
+ # after pressure notification
+ action_runner.Wait(DUMP_WAIT_TIME)
+# action_runner.ForceGarbageCollection()
action_runner.SimulateMemoryPressureNotification('critical')
action_runner.Wait(DUMP_WAIT_TIME)
if not action_runner.tab.browser.DumpMemory():
« no previous file with comments | « third_party/WebKit/Source/web/WebMemoryPressureListener.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698