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

Side by Side Diff: base/metrics/histogram_macros.h

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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/metrics/metrics_memory_details.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef BASE_METRICS_HISTOGRAM_MACROS_H_ 5 #ifndef BASE_METRICS_HISTOGRAM_MACROS_H_
6 #define BASE_METRICS_HISTOGRAM_MACROS_H_ 6 #define BASE_METRICS_HISTOGRAM_MACROS_H_
7 7
8 #include "base/atomicops.h" 8 #include "base/atomicops.h"
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 STATIC_HISTOGRAM_POINTER_BLOCK(name, Add(sample), \ 199 STATIC_HISTOGRAM_POINTER_BLOCK(name, Add(sample), \
200 base::Histogram::FactoryGet(name, min, max, bucket_count, \ 200 base::Histogram::FactoryGet(name, min, max, bucket_count, \
201 base::HistogramBase::kUmaTargetedHistogramFlag)) 201 base::HistogramBase::kUmaTargetedHistogramFlag))
202 202
203 #define UMA_HISTOGRAM_MEMORY_KB(name, sample) UMA_HISTOGRAM_CUSTOM_COUNTS( \ 203 #define UMA_HISTOGRAM_MEMORY_KB(name, sample) UMA_HISTOGRAM_CUSTOM_COUNTS( \
204 name, sample, 1000, 500000, 50) 204 name, sample, 1000, 500000, 50)
205 205
206 #define UMA_HISTOGRAM_MEMORY_MB(name, sample) UMA_HISTOGRAM_CUSTOM_COUNTS( \ 206 #define UMA_HISTOGRAM_MEMORY_MB(name, sample) UMA_HISTOGRAM_CUSTOM_COUNTS( \
207 name, sample, 1, 1000, 50) 207 name, sample, 1, 1000, 50)
208 208
209 #define UMA_HISTOGRAM_MEMORY_LARGE_MB(name, sample) \
210 UMA_HISTOGRAM_CUSTOM_COUNTS(name, sample, 1, 64000, 100)
211
209 #define UMA_HISTOGRAM_PERCENTAGE(name, under_one_hundred) \ 212 #define UMA_HISTOGRAM_PERCENTAGE(name, under_one_hundred) \
210 UMA_HISTOGRAM_ENUMERATION(name, under_one_hundred, 101) 213 UMA_HISTOGRAM_ENUMERATION(name, under_one_hundred, 101)
211 214
212 #define UMA_HISTOGRAM_BOOLEAN(name, sample) \ 215 #define UMA_HISTOGRAM_BOOLEAN(name, sample) \
213 STATIC_HISTOGRAM_POINTER_BLOCK(name, AddBoolean(sample), \ 216 STATIC_HISTOGRAM_POINTER_BLOCK(name, AddBoolean(sample), \
214 base::BooleanHistogram::FactoryGet(name, \ 217 base::BooleanHistogram::FactoryGet(name, \
215 base::HistogramBase::kUmaTargetedHistogramFlag)) 218 base::HistogramBase::kUmaTargetedHistogramFlag))
216 219
217 // The samples should always be strictly less than |boundary_value|. For more 220 // The samples should always be strictly less than |boundary_value|. For more
218 // details, see the comment for the |LOCAL_HISTOGRAM_ENUMERATION| macro, above. 221 // details, see the comment for the |LOCAL_HISTOGRAM_ENUMERATION| macro, above.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 UMA_HISTOGRAM_LONG_TIMES_100(name, elapsed); \ 261 UMA_HISTOGRAM_LONG_TIMES_100(name, elapsed); \
259 } else { \ 262 } else { \
260 UMA_HISTOGRAM_TIMES(name, elapsed); \ 263 UMA_HISTOGRAM_TIMES(name, elapsed); \
261 } \ 264 } \
262 } \ 265 } \
263 private: \ 266 private: \
264 base::TimeTicks constructed_; \ 267 base::TimeTicks constructed_; \
265 } scoped_histogram_timer_##key 268 } scoped_histogram_timer_##key
266 269
267 #endif // BASE_METRICS_HISTOGRAM_MACROS_H_ 270 #endif // BASE_METRICS_HISTOGRAM_MACROS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/metrics/metrics_memory_details.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698