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

Side by Side Diff: base/metrics/histogram_base.cc

Issue 1913803003: Write non-critical log messages only for -v=1. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | base/metrics/persistent_histogram_allocator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/metrics/histogram_base.h" 5 #include "base/metrics/histogram_base.h"
6 6
7 #include <limits.h> 7 #include <limits.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 root.SetInteger("pid", GetCurrentProcId()); 121 root.SetInteger("pid", GetCurrentProcId());
122 serializer.Serialize(root); 122 serializer.Serialize(root);
123 } 123 }
124 124
125 // static 125 // static
126 void HistogramBase::EnableActivityReportHistogram( 126 void HistogramBase::EnableActivityReportHistogram(
127 const std::string& process_type) { 127 const std::string& process_type) {
128 DCHECK(!report_histogram_); 128 DCHECK(!report_histogram_);
129 size_t existing = StatisticsRecorder::GetHistogramCount(); 129 size_t existing = StatisticsRecorder::GetHistogramCount();
130 if (existing != 0) { 130 if (existing != 0) {
131 DLOG(WARNING) << existing 131 DVLOG(1) << existing
132 << " histograms were created before reporting was enabled."; 132 << " histograms were created before reporting was enabled.";
133 } 133 }
134 134
135 std::string name = 135 std::string name =
136 "UMA.Histograms.Activity" + 136 "UMA.Histograms.Activity" +
137 (process_type.empty() ? process_type : "." + process_type); 137 (process_type.empty() ? process_type : "." + process_type);
138 138
139 // Calling FactoryGet() here rather than using a histogram-macro works 139 // Calling FactoryGet() here rather than using a histogram-macro works
140 // around some problems with tests that could end up seeing the results 140 // around some problems with tests that could end up seeing the results
141 // histogram when not expected due to a bad interaction between 141 // histogram when not expected due to a bad interaction between
142 // HistogramTester and StatisticsRecorder. 142 // HistogramTester and StatisticsRecorder.
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 report_histogram_->Add(HISTOGRAM_REPORT_FLAG_UMA_TARGETED); 224 report_histogram_->Add(HISTOGRAM_REPORT_FLAG_UMA_TARGETED);
225 break; 225 break;
226 226
227 case HISTOGRAM_LOOKUP: 227 case HISTOGRAM_LOOKUP:
228 report_histogram_->Add(HISTOGRAM_REPORT_HISTOGRAM_LOOKUP); 228 report_histogram_->Add(HISTOGRAM_REPORT_HISTOGRAM_LOOKUP);
229 break; 229 break;
230 } 230 }
231 } 231 }
232 232
233 } // namespace base 233 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | base/metrics/persistent_histogram_allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698