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

Unified Diff: base/metrics/persistent_histogram_allocator.cc

Issue 1726873002: Report histogram creation results. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 9 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_base_unittest.cc ('k') | base/metrics/sparse_histogram.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/persistent_histogram_allocator.cc
diff --git a/base/metrics/persistent_histogram_allocator.cc b/base/metrics/persistent_histogram_allocator.cc
index 1929060d8e5421ff2c64fb6aa00dce3e6a5cf43f..2e4029ef6a60e7f2bd68e67c42f1ad861e9851cf 100644
--- a/base/metrics/persistent_histogram_allocator.cc
+++ b/base/metrics/persistent_histogram_allocator.cc
@@ -179,6 +179,11 @@ void PersistentHistogramAllocator::SetGlobalAllocator(
// also released, future accesses to those histograms will seg-fault.
CHECK(!g_allocator);
g_allocator = allocator.release();
+
+ size_t existing = StatisticsRecorder::GetHistogramCount();
+ DLOG_IF(WARNING, existing)
+ << existing
+ << " histograms were created before persistence was enabled.";
}
// static
« no previous file with comments | « base/metrics/histogram_base_unittest.cc ('k') | base/metrics/sparse_histogram.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698