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

Unified Diff: base/metrics/histogram.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 | « no previous file | base/metrics/histogram_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/histogram.cc
diff --git a/base/metrics/histogram.cc b/base/metrics/histogram.cc
index e8d851bf9de3ae3c2831a72d976ec9bd32b6beb5..cd6d6bea0875ee7f399700759bbf89374bf2e4f3 100644
--- a/base/metrics/histogram.cc
+++ b/base/metrics/histogram.cc
@@ -216,9 +216,15 @@ HistogramBase* Histogram::Factory::Build() {
allocator->FinalizeHistogram(histogram_ref,
histogram == tentative_histogram_ptr);
}
+
+ // Update report on created histograms.
+ ReportHistogramActivity(*histogram, HISTOGRAM_CREATED);
+ } else {
+ // Update report on lookup histograms.
+ ReportHistogramActivity(*histogram, HISTOGRAM_LOOKUP);
}
- DCHECK_EQ(histogram_type_, histogram->GetHistogramType());
+ DCHECK_EQ(histogram_type_, histogram->GetHistogramType()) << name_;
if (bucket_count_ != 0 &&
!histogram->HasConstructionArguments(minimum_, maximum_, bucket_count_)) {
// The construction arguments do not match the existing histogram. This can
« no previous file with comments | « no previous file | base/metrics/histogram_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698