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

Unified Diff: content/browser/memory/memory_coordinator_impl.cc

Issue 2482863003: Add Memory.Coordinator.FreeMemoryUntilCritical UMA (Closed)
Patch Set: Assign TODO to chrisha@ Created 4 years, 1 month 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/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/memory/memory_coordinator_impl.cc
diff --git a/content/browser/memory/memory_coordinator_impl.cc b/content/browser/memory/memory_coordinator_impl.cc
index df4e005e6d7c27f5854deef3e4e8c327d9cb50b7..2340b237efcc9d08cae6a8caa311b3d5cc402e0a 100644
--- a/content/browser/memory/memory_coordinator_impl.cc
+++ b/content/browser/memory/memory_coordinator_impl.cc
@@ -4,6 +4,7 @@
#include "content/browser/memory/memory_coordinator_impl.h"
+#include "base/metrics/histogram_macros.h"
#include "base/threading/thread_task_runner_handle.h"
#include "base/trace_event/trace_event.h"
#include "content/browser/memory/memory_monitor.h"
@@ -154,6 +155,12 @@ base::MemoryState MemoryCoordinatorImpl::CalculateNextState() {
using MemoryState = base::MemoryState;
int available = memory_monitor_->GetFreeMemoryUntilCriticalMB();
+
+ // TODO(chrisha): Move this histogram recording to a better place when
+ // https://codereview.chromium.org/2479673002/ is landed.
+ UMA_HISTOGRAM_MEMORY_LARGE_MB("Memory.Coordinator.FreeMemoryUntilCritical",
+ available);
+
if (available <= 0)
return MemoryState::SUSPENDED;
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698