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

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

Issue 1270193002: Add new memory histograms which fix inprecise bucketing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix the units of the new metrics Created 5 years, 4 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 | « base/metrics/histogram_macros.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/metrics/metrics_memory_details.cc
diff --git a/chrome/browser/metrics/metrics_memory_details.cc b/chrome/browser/metrics/metrics_memory_details.cc
index 69b343240dfbdabddcbae2da0f903e47ea22a949..2d830492d47d947b82db355821e5e4d0fbdbe10b 100644
--- a/chrome/browser/metrics/metrics_memory_details.cc
+++ b/chrome/browser/metrics/metrics_memory_details.cc
@@ -195,8 +195,11 @@ void MetricsMemoryDetails::UpdateHistograms() {
// TODO(viettrungluu): Do we want separate counts for the other
// (platform-specific) process types?
- int total_sample = static_cast<int>(aggregate_memory / 1000);
- UMA_HISTOGRAM_MEMORY_MB("Memory.Total", total_sample);
+ // TODO(rkaplow): Remove once we've verified Memory.Total2 is ok.
+ int total_sample_old = static_cast<int>(aggregate_memory / 1000);
+ UMA_HISTOGRAM_MEMORY_MB("Memory.Total", total_sample_old);
+ int total_sample = static_cast<int>(aggregate_memory / 1024);
+ UMA_HISTOGRAM_MEMORY_LARGE_MB("Memory.Total2", total_sample);
#if defined(OS_CHROMEOS)
UpdateSwapHistograms();
@@ -272,8 +275,11 @@ void MetricsMemoryDetails::UpdateSwapHistograms() {
}
}
- int total_sample = static_cast<int>(aggregate_memory / 1000);
- UMA_HISTOGRAM_MEMORY_MB("Memory.Swap.Total", total_sample);
+ // TODO(rkaplow): Remove once we've verified Memory.Swap.Total2 is ok.
+ int total_sample_old = static_cast<int>(aggregate_memory / 1000);
+ UMA_HISTOGRAM_MEMORY_MB("Memory.Swap.Total", total_sample_old);
+ int total_sample = static_cast<int>(aggregate_memory / 1024);
+ UMA_HISTOGRAM_MEMORY_LARGE_MB("Memory.Swap.Total2", total_sample);
UMA_HISTOGRAM_CUSTOM_COUNTS("Memory.Swap.CompressedDataSize",
swap_info().compr_data_size / (1024 * 1024), 1,
« no previous file with comments | « base/metrics/histogram_macros.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698