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

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

Issue 2350423003: [Tentaive patch for discussion] Add Purge+Suspend metrics as UMA.
Patch Set: Add v8 heap usage Created 4 years, 3 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
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 3c38d9e627f304807a8ca73fdf0b4af8324a4719..dbb5ce99c161865a6638cc77aee4dcaa703d45a5 100644
--- a/tools/perf/page_sets/blink_memory_mobile.py
+++ b/tools/perf/page_sets/blink_memory_mobile.py
@@ -25,8 +25,14 @@ class BlinkMemoryMobilePage(page_module.Page):
def _DumpMemory(self, action_runner, phase):
with action_runner.CreateInteraction(phase):
action_runner.Wait(DUMP_WAIT_TIME)
+ # Open blank tab (Move the page to background).
+ action_runner.tab.browser.tabs.New()
+ action_runner.Wait(5)
action_runner.ForceGarbageCollection()
- action_runner.SimulateMemoryPressureNotification('critical')
+ if not action_runner.tab.browser.DumpMemory():
+ logging.error('Unable to get a memory dump for %s.', self.name)
+ action_runner.Wait(20)
+ #action_runner.SimulateMemoryPressureNotification('critical')
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)

Powered by Google App Engine
This is Rietveld 408576698