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

Unified Diff: tools/perf/perf_tools/memory_measurement.py

Issue 15093008: Telemetry: integrates memory_measurement with TCMalloc dumps (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments Created 7 years, 7 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 | « no previous file | tools/telemetry/telemetry/core/browser.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/perf_tools/memory_measurement.py
diff --git a/tools/perf/perf_tools/memory_measurement.py b/tools/perf/perf_tools/memory_measurement.py
index 8d1724d146681d588c7afa23d47ff1dd287cef09..37e14a21b5290d75695125aa752be47bb4b8bace 100644
--- a/tools/perf/perf_tools/memory_measurement.py
+++ b/tools/perf/perf_tools/memory_measurement.py
@@ -46,3 +46,15 @@ class MemoryMeasurement(page_measurement.PageMeasurement):
def MeasurePage(self, page, tab, results):
for h in self.histograms:
h.GetValue(page, tab, results)
+
+ if tab.browser.is_profiler_active('tcmalloc-heap'):
+ # The tcmalloc_heap_profiler dumps files at regular
+ # intervals (~20 secs).
+ # This is a minor optimization to ensure it'll dump the last file when
+ # the test completes.
+ tab.ExecuteJavaScript("""
+ if (chrome && chrome.memoryBenchmarking) {
+ chrome.memoryBenchmarking.heapProfilerDump('final', 'renderer');
+ chrome.memoryBenchmarking.heapProfilerDump('final', 'browser');
+ }
+ """)
« no previous file with comments | « no previous file | tools/telemetry/telemetry/core/browser.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698