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

Unified Diff: chrome/browser/metrics/process_memory_metrics_emitter.cc

Issue 2904703002: Add a histogram for total private memory footprint. (Closed)
Patch Set: Update tests to check private memory footprint on Windows. Created 3 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 | chrome/browser/metrics/process_memory_metrics_emitter_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/metrics/process_memory_metrics_emitter.cc
diff --git a/chrome/browser/metrics/process_memory_metrics_emitter.cc b/chrome/browser/metrics/process_memory_metrics_emitter.cc
index 6cf44b923b715d72f5fcaf5806691857380f1258..8f6e77c27258a020f209fa70c4a3f68abe39acc4 100644
--- a/chrome/browser/metrics/process_memory_metrics_emitter.cc
+++ b/chrome/browser/metrics/process_memory_metrics_emitter.cc
@@ -83,7 +83,9 @@ void ProcessMemoryMetricsEmitter::ReceivedMemoryDump(
if (!ptr)
return;
+ uint32_t private_footprint_total_kb = 0;
for (const ProcessMemoryDumpPtr& pmd : ptr->process_dumps) {
+ private_footprint_total_kb += pmd->private_footprint;
switch (pmd->process_type) {
case memory_instrumentation::mojom::ProcessType::BROWSER:
EmitBrowserMemoryMetrics(pmd);
@@ -100,4 +102,7 @@ void ProcessMemoryMetricsEmitter::ReceivedMemoryDump(
break;
}
}
+ UMA_HISTOGRAM_MEMORY_LARGE_MB(
+ "Memory.Experimental.Total2.PrivateMemoryFootprint",
+ private_footprint_total_kb / 1024);
}
« no previous file with comments | « no previous file | chrome/browser/metrics/process_memory_metrics_emitter_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698