OLD | NEW |
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 Loading... |
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 Loading... |
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_ |
OLD | NEW |