OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 15 matching lines...) Expand all Loading... |
26 // |StatsCounterObserver| is called periodically when a metric is updated. | 26 // |StatsCounterObserver| is called periodically when a metric is updated. |
27 class StatsCounterObserver { | 27 class StatsCounterObserver { |
28 public: | 28 public: |
29 virtual void OnMetricUpdated(int sample) = 0; | 29 virtual void OnMetricUpdated(int sample) = 0; |
30 | 30 |
31 virtual ~StatsCounterObserver() {} | 31 virtual ~StatsCounterObserver() {} |
32 }; | 32 }; |
33 | 33 |
34 struct AggregatedStats { | 34 struct AggregatedStats { |
35 std::string ToString() const; | 35 std::string ToString() const; |
| 36 std::string ToStringWithMultiplier(int multiplier) const; |
36 | 37 |
37 int64_t num_samples = 0; | 38 int64_t num_samples = 0; |
38 int min = -1; | 39 int min = -1; |
39 int max = -1; | 40 int max = -1; |
40 int average = -1; | 41 int average = -1; |
41 // TODO(asapersson): Consider adding median/percentiles. | 42 // TODO(asapersson): Consider adding median/percentiles. |
42 }; | 43 }; |
43 | 44 |
44 // Classes which periodically computes a metric. | 45 // Classes which periodically computes a metric. |
45 // | 46 // |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 private: | 268 private: |
268 bool GetMetric(int* metric) const override; | 269 bool GetMetric(int* metric) const override; |
269 int GetValueForEmptyInterval() const override; // Returns zero. | 270 int GetValueForEmptyInterval() const override; // Returns zero. |
270 | 271 |
271 RTC_DISALLOW_COPY_AND_ASSIGN(RateAccCounter); | 272 RTC_DISALLOW_COPY_AND_ASSIGN(RateAccCounter); |
272 }; | 273 }; |
273 | 274 |
274 } // namespace webrtc | 275 } // namespace webrtc |
275 | 276 |
276 #endif // WEBRTC_VIDEO_STATS_COUNTER_H_ | 277 #endif // WEBRTC_VIDEO_STATS_COUNTER_H_ |
OLD | NEW |