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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 STATIC_HISTOGRAM_POINTER_BLOCK(name, AddTime(sample), \ | 182 STATIC_HISTOGRAM_POINTER_BLOCK(name, AddTime(sample), \ |
183 base::Histogram::FactoryTimeGet(name, min, max, bucket_count, \ | 183 base::Histogram::FactoryTimeGet(name, min, max, bucket_count, \ |
184 base::HistogramBase::kUmaTargetedHistogramFlag)) | 184 base::HistogramBase::kUmaTargetedHistogramFlag)) |
185 | 185 |
186 #define UMA_HISTOGRAM_COUNTS(name, sample) UMA_HISTOGRAM_CUSTOM_COUNTS( \ | 186 #define UMA_HISTOGRAM_COUNTS(name, sample) UMA_HISTOGRAM_CUSTOM_COUNTS( \ |
187 name, sample, 1, 1000000, 50) | 187 name, sample, 1, 1000000, 50) |
188 | 188 |
189 #define UMA_HISTOGRAM_COUNTS_100(name, sample) UMA_HISTOGRAM_CUSTOM_COUNTS( \ | 189 #define UMA_HISTOGRAM_COUNTS_100(name, sample) UMA_HISTOGRAM_CUSTOM_COUNTS( \ |
190 name, sample, 1, 100, 50) | 190 name, sample, 1, 100, 50) |
191 | 191 |
| 192 #define UMA_HISTOGRAM_COUNTS_1000(name, sample) \ |
| 193 UMA_HISTOGRAM_CUSTOM_COUNTS(name, sample, 1, 1000, 50) |
| 194 |
192 #define UMA_HISTOGRAM_COUNTS_10000(name, sample) UMA_HISTOGRAM_CUSTOM_COUNTS( \ | 195 #define UMA_HISTOGRAM_COUNTS_10000(name, sample) UMA_HISTOGRAM_CUSTOM_COUNTS( \ |
193 name, sample, 1, 10000, 50) | 196 name, sample, 1, 10000, 50) |
194 | 197 |
195 #define UMA_HISTOGRAM_CUSTOM_COUNTS(name, sample, min, max, bucket_count) \ | 198 #define UMA_HISTOGRAM_CUSTOM_COUNTS(name, sample, min, max, bucket_count) \ |
196 STATIC_HISTOGRAM_POINTER_BLOCK(name, Add(sample), \ | 199 STATIC_HISTOGRAM_POINTER_BLOCK(name, Add(sample), \ |
197 base::Histogram::FactoryGet(name, min, max, bucket_count, \ | 200 base::Histogram::FactoryGet(name, min, max, bucket_count, \ |
198 base::HistogramBase::kUmaTargetedHistogramFlag)) | 201 base::HistogramBase::kUmaTargetedHistogramFlag)) |
199 | 202 |
200 #define UMA_HISTOGRAM_MEMORY_KB(name, sample) UMA_HISTOGRAM_CUSTOM_COUNTS( \ | 203 #define UMA_HISTOGRAM_MEMORY_KB(name, sample) UMA_HISTOGRAM_CUSTOM_COUNTS( \ |
201 name, sample, 1000, 500000, 50) | 204 name, sample, 1000, 500000, 50) |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 UMA_HISTOGRAM_LONG_TIMES_100(name, elapsed); \ | 258 UMA_HISTOGRAM_LONG_TIMES_100(name, elapsed); \ |
256 } else { \ | 259 } else { \ |
257 UMA_HISTOGRAM_TIMES(name, elapsed); \ | 260 UMA_HISTOGRAM_TIMES(name, elapsed); \ |
258 } \ | 261 } \ |
259 } \ | 262 } \ |
260 private: \ | 263 private: \ |
261 base::TimeTicks constructed_; \ | 264 base::TimeTicks constructed_; \ |
262 } scoped_histogram_timer_##key | 265 } scoped_histogram_timer_##key |
263 | 266 |
264 #endif // BASE_METRICS_HISTOGRAM_MACROS_H_ | 267 #endif // BASE_METRICS_HISTOGRAM_MACROS_H_ |
OLD | NEW |