| OLD | NEW |
| 1 // | 1 // |
| 2 // Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 // Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. |
| 3 // | 3 // |
| 4 // Use of this source code is governed by a BSD-style license | 4 // Use of this source code is governed by a BSD-style license |
| 5 // that can be found in the LICENSE file in the root of the source | 5 // that can be found in the LICENSE file in the root of the source |
| 6 // tree. An additional intellectual property rights grant can be found | 6 // tree. An additional intellectual property rights grant can be found |
| 7 // in the file PATENTS. All contributing project authors may | 7 // in the file PATENTS. All contributing project authors may |
| 8 // be found in the AUTHORS file in the root of the source tree. | 8 // be found in the AUTHORS file in the root of the source tree. |
| 9 // | 9 // |
| 10 | 10 |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 #define RTC_HISTOGRAM_COUNTS_10000(name, sample) \ | 78 #define RTC_HISTOGRAM_COUNTS_10000(name, sample) \ |
| 79 RTC_HISTOGRAM_COUNTS(name, sample, 1, 10000, 50) | 79 RTC_HISTOGRAM_COUNTS(name, sample, 1, 10000, 50) |
| 80 | 80 |
| 81 #define RTC_HISTOGRAM_COUNTS_100000(name, sample) \ | 81 #define RTC_HISTOGRAM_COUNTS_100000(name, sample) \ |
| 82 RTC_HISTOGRAM_COUNTS(name, sample, 1, 100000, 50) | 82 RTC_HISTOGRAM_COUNTS(name, sample, 1, 100000, 50) |
| 83 | 83 |
| 84 #define RTC_HISTOGRAM_COUNTS(name, sample, min, max, bucket_count) \ | 84 #define RTC_HISTOGRAM_COUNTS(name, sample, min, max, bucket_count) \ |
| 85 RTC_HISTOGRAM_COMMON_BLOCK(name, sample, \ | 85 RTC_HISTOGRAM_COMMON_BLOCK(name, sample, \ |
| 86 webrtc::metrics::HistogramFactoryGetCounts(name, min, max, bucket_count)) | 86 webrtc::metrics::HistogramFactoryGetCounts(name, min, max, bucket_count)) |
| 87 | 87 |
| 88 #define RTC_HISTOGRAM_COUNTS_LINEAR(name, sample, min, max, bucket_count) \ |
| 89 RTC_HISTOGRAM_COMMON_BLOCK(name, sample, \ |
| 90 webrtc::metrics::HistogramFactoryGetCountsLinear( \ |
| 91 name, min, max, bucket_count)) |
| 92 |
| 88 // Deprecated. | 93 // Deprecated. |
| 89 // TODO(asapersson): Remove. | 94 // TODO(asapersson): Remove. |
| 90 #define RTC_HISTOGRAM_COUNTS_SPARSE_100(name, sample) \ | 95 #define RTC_HISTOGRAM_COUNTS_SPARSE_100(name, sample) \ |
| 91 RTC_HISTOGRAM_COUNTS_SPARSE(name, sample, 1, 100, 50) | 96 RTC_HISTOGRAM_COUNTS_SPARSE(name, sample, 1, 100, 50) |
| 92 | 97 |
| 93 #define RTC_HISTOGRAM_COUNTS_SPARSE(name, sample, min, max, bucket_count) \ | 98 #define RTC_HISTOGRAM_COUNTS_SPARSE(name, sample, min, max, bucket_count) \ |
| 94 RTC_HISTOGRAM_COMMON_BLOCK_SLOW(name, sample, \ | 99 RTC_HISTOGRAM_COMMON_BLOCK_SLOW(name, sample, \ |
| 95 webrtc::metrics::HistogramFactoryGetCounts(name, min, max, bucket_count)) | 100 webrtc::metrics::HistogramFactoryGetCounts(name, min, max, bucket_count)) |
| 96 | 101 |
| 97 // Histogram for percentage (evenly spaced buckets). | 102 // Histogram for percentage (evenly spaced buckets). |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 | 211 |
| 207 class Histogram; | 212 class Histogram; |
| 208 | 213 |
| 209 // Functions for getting pointer to histogram (constructs or finds the named | 214 // Functions for getting pointer to histogram (constructs or finds the named |
| 210 // histogram). | 215 // histogram). |
| 211 | 216 |
| 212 // Get histogram for counters. | 217 // Get histogram for counters. |
| 213 Histogram* HistogramFactoryGetCounts( | 218 Histogram* HistogramFactoryGetCounts( |
| 214 const std::string& name, int min, int max, int bucket_count); | 219 const std::string& name, int min, int max, int bucket_count); |
| 215 | 220 |
| 221 // Get histogram for counters with linear bucket spacing. |
| 222 Histogram* HistogramFactoryGetCountsLinear(const std::string& name, |
| 223 int min, |
| 224 int max, |
| 225 int bucket_count); |
| 226 |
| 216 // Get histogram for enumerators. | 227 // Get histogram for enumerators. |
| 217 // |boundary| should be above the max enumerator sample. | 228 // |boundary| should be above the max enumerator sample. |
| 218 Histogram* HistogramFactoryGetEnumeration( | 229 Histogram* HistogramFactoryGetEnumeration( |
| 219 const std::string& name, int boundary); | 230 const std::string& name, int boundary); |
| 220 | 231 |
| 221 // Returns name of the histogram. | 232 // Returns name of the histogram. |
| 222 const std::string& GetHistogramName(Histogram* histogram_pointer); | 233 const std::string& GetHistogramName(Histogram* histogram_pointer); |
| 223 | 234 |
| 224 // Function for adding a |sample| to a histogram. | 235 // Function for adding a |sample| to a histogram. |
| 225 void HistogramAdd(Histogram* histogram_pointer, int sample); | 236 void HistogramAdd(Histogram* histogram_pointer, int sample); |
| 226 | 237 |
| 227 } // namespace metrics | 238 } // namespace metrics |
| 228 } // namespace webrtc | 239 } // namespace webrtc |
| 229 | 240 |
| 230 #endif // WEBRTC_SYSTEM_WRAPPERS_INCLUDE_METRICS_H_ | 241 #endif // WEBRTC_SYSTEM_WRAPPERS_INCLUDE_METRICS_H_ |
| 231 | 242 |
| OLD | NEW |