OLD | NEW |
---|---|
(Empty) | |
1 /* | |
2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. | |
3 * | |
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 | |
6 * tree. An additional intellectual property rights grant can be found | |
7 * in the file PATENTS. All contributing project authors may | |
8 * be found in the AUTHORS file in the root of the source tree. | |
9 * | |
10 */ | |
11 | |
12 #ifndef WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_STATS_H_ | |
13 #define WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_STATS_H_ | |
14 | |
15 namespace webrtc { | |
16 namespace testing { | |
17 namespace bwe { | |
18 class Data { | |
philipel
2017/05/29 09:38:50
Please find a better name for this class.
gnish2
2017/05/29 11:04:26
Done.
| |
19 public: | |
20 Data(); | |
21 virtual ~Data(); | |
22 | |
23 int64_t last_min_rtt_evaluation_time() { | |
24 return last_min_rtt_evaluation_time_; | |
25 } | |
26 int64_t time_min_cwnd_started() { return time_min_cwnd_started_; } | |
27 int64_t cwnd() { return cwnd_; } | |
28 void set_cwnd(int cwnd) { cwnd_ = cwnd; } | |
29 int64_t secondary_cwnd() { return secondary_cwnd_; } | |
30 void set_secondary_cwnd(int64_t secondary_cwnd) { | |
31 secondary_cwnd_ = secondary_cwnd; | |
32 } | |
33 bool DeliveryRateGrows(); | |
34 int64_t pacing_rate() { return pacing_rate_; } | |
35 void set_pacing_rate(int pacing_rate) { pacing_rate_ = pacing_rate; } | |
36 int64_t min_rtt() { return min_rtt_; } | |
37 void set_min_rtt(int64_t min_rtt) { min_rtt_ = min_rtt; } | |
38 void set_min_rtt_time(int64_t min_rtt_time) { min_rtt_time_ = min_rtt_time; } | |
39 int64_t min_rtt_time() { return min_rtt_time_; } | |
40 void UpdateMinRtt(int64_t rtt); | |
41 int64_t GetTargetCwnd(); | |
42 void set_bdp(int64_t bdp) { bdp_ = bdp; } | |
43 int64_t max_bdw() { return max_bdw_; } | |
44 int64_t delivered() { return delivered_; } | |
45 void AddDelivered(int64_t payload); | |
46 int64_t delivered_time() { return delivered_time_; } | |
47 void set_delivered_time(int64_t delivered_time) { | |
48 delivered_time_ = delivered_time; | |
49 } | |
50 void set_delivery_rate(int64_t delivery_rate) { | |
51 delivery_rate_ = delivery_rate; | |
52 } | |
53 void set_pacing_gain(float pacing_gain) { pacing_gain_ = pacing_gain; } | |
54 int64_t bytes_acked() { return bytes_acked_; } | |
55 int64_t inflight() { return inflight_; } | |
56 void AddBandwidth(int64_t bandwidth); | |
57 void set_cycle_start_time(int64_t cycle_start_time); | |
58 int64_t cycle_start_time(); | |
59 void set_cycle_index(int64_t cycle_index); | |
60 int64_t cycle_index(); | |
61 bool PacketsInFlightHasDecreased(int64_t target_value); | |
62 void CalculatePacingRate(); | |
63 void CalculateCongestionWindow(); | |
64 | |
65 private: | |
66 int64_t last_min_rtt_evaluation_time_; | |
67 int64_t time_min_cwnd_started_; | |
68 int64_t cwnd_; | |
69 int64_t secondary_cwnd_; | |
70 int64_t pacing_rate_; | |
71 int64_t max_bdw_; | |
72 int64_t min_rtt_; | |
73 int64_t bdp_; | |
74 int64_t delivered_; | |
75 int64_t delivered_time_; | |
76 int64_t delivery_rate_; | |
77 int64_t bytes_acked_; | |
78 int64_t min_rtt_time_; | |
79 float pacing_gain_; | |
80 int64_t inflight_; | |
81 }; | |
82 } // namespace bwe | |
83 } // namespace testing | |
84 } // namespace webrtc | |
85 | |
86 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_STATS_H_ | |
OLD | NEW |