| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 // and temporary solution. Note that the histogram is constructed/found for | 65 // and temporary solution. Note that the histogram is constructed/found for |
| 66 // each call. Therefore, for now only use this implementation for metrics | 66 // each call. Therefore, for now only use this implementation for metrics |
| 67 // that do not need to be updated frequently. | 67 // that do not need to be updated frequently. |
| 68 // TODO(asapersson): Change implementation when atomics are supported. | 68 // TODO(asapersson): Change implementation when atomics are supported. |
| 69 // Also consider changing string to const char* when switching to atomics. | 69 // Also consider changing string to const char* when switching to atomics. |
| 70 | 70 |
| 71 // Histogram for counters. | 71 // Histogram for counters. |
| 72 #define RTC_HISTOGRAM_COUNTS_100(name, sample) RTC_HISTOGRAM_COUNTS( \ | 72 #define RTC_HISTOGRAM_COUNTS_100(name, sample) RTC_HISTOGRAM_COUNTS( \ |
| 73 name, sample, 1, 100, 50) | 73 name, sample, 1, 100, 50) |
| 74 | 74 |
| 75 #define RTC_HISTOGRAM_COUNTS_200(name, sample) RTC_HISTOGRAM_COUNTS( \ |
| 76 name, sample, 1, 200, 50) |
| 77 |
| 75 #define RTC_HISTOGRAM_COUNTS_1000(name, sample) RTC_HISTOGRAM_COUNTS( \ | 78 #define RTC_HISTOGRAM_COUNTS_1000(name, sample) RTC_HISTOGRAM_COUNTS( \ |
| 76 name, sample, 1, 1000, 50) | 79 name, sample, 1, 1000, 50) |
| 77 | 80 |
| 78 #define RTC_HISTOGRAM_COUNTS_10000(name, sample) RTC_HISTOGRAM_COUNTS( \ | 81 #define RTC_HISTOGRAM_COUNTS_10000(name, sample) RTC_HISTOGRAM_COUNTS( \ |
| 79 name, sample, 1, 10000, 50) | 82 name, sample, 1, 10000, 50) |
| 80 | 83 |
| 81 #define RTC_HISTOGRAM_COUNTS_100000(name, sample) RTC_HISTOGRAM_COUNTS( \ | 84 #define RTC_HISTOGRAM_COUNTS_100000(name, sample) RTC_HISTOGRAM_COUNTS( \ |
| 82 name, sample, 1, 100000, 50) | 85 name, sample, 1, 100000, 50) |
| 83 | 86 |
| 84 #define RTC_HISTOGRAM_COUNTS(name, sample, min, max, bucket_count) \ | 87 #define RTC_HISTOGRAM_COUNTS(name, sample, min, max, bucket_count) \ |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 // Function for adding a |sample| to a histogram. | 130 // Function for adding a |sample| to a histogram. |
| 128 // |name| can be used to verify that it matches the histogram name. | 131 // |name| can be used to verify that it matches the histogram name. |
| 129 void HistogramAdd( | 132 void HistogramAdd( |
| 130 Histogram* histogram_pointer, const std::string& name, int sample); | 133 Histogram* histogram_pointer, const std::string& name, int sample); |
| 131 | 134 |
| 132 } // namespace metrics | 135 } // namespace metrics |
| 133 } // namespace webrtc | 136 } // namespace webrtc |
| 134 | 137 |
| 135 #endif // WEBRTC_SYSTEM_WRAPPERS_INTERFACE_METRICS_H_ | 138 #endif // WEBRTC_SYSTEM_WRAPPERS_INTERFACE_METRICS_H_ |
| 136 | 139 |
| OLD | NEW |