Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(462)

Side by Side Diff: webrtc/modules/remote_bitrate_estimator/test/estimators/stats.h

Issue 2904183002: Structure of BBR's implementation,some main classes and functions which are going to be used (Closed)
Patch Set: Moved include on top Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 ConnectionState {
19 public:
20 ConnectionState();
21 virtual ~ConnectionState();
22
23 int64_t time_min_cwnd_started() { return time_min_cwnd_started_; }
24 int64_t cwnd() { return cwnd_; }
25 void set_cwnd(int cwnd) { cwnd_ = cwnd; }
26 int64_t secondary_cwnd() { return secondary_cwnd_; }
27 void set_secondary_cwnd(int64_t secondary_cwnd) {
28 secondary_cwnd_ = secondary_cwnd;
29 }
30 bool DeliveryRateGrows();
31 int64_t pacing_rate() { return pacing_rate_; }
32 void set_pacing_rate(int pacing_rate) { pacing_rate_ = pacing_rate; }
33 int64_t min_rtt() { return min_rtt_; }
34 void set_min_rtt(int64_t min_rtt) { min_rtt_ = min_rtt; }
35 void set_min_rtt_time(int64_t min_rtt_time) { min_rtt_time_ = min_rtt_time; }
36 int64_t min_rtt_time() { return min_rtt_time_; }
37 void UpdateMinRtt(int64_t rtt);
38 int64_t GetTargetCwnd();
39 void set_bdp(int64_t bdp) { bdp_ = bdp; }
40 int64_t max_bdw() { return max_bdw_; }
41 int64_t delivered() { return delivered_; }
42 void AddDelivered(int64_t payload);
43 int64_t delivered_time() { return delivered_time_; }
44 void set_delivered_time(int64_t delivered_time) {
45 delivered_time_ = delivered_time;
46 }
47 void set_delivery_rate(int64_t delivery_rate) {
48 delivery_rate_ = delivery_rate;
49 }
50 void set_pacing_gain(float pacing_gain) { pacing_gain_ = pacing_gain; }
51 int64_t bytes_acked() { return bytes_acked_; }
52 int64_t inflight() { return inflight_; }
53 void AddBandwidth(int64_t bandwidth);
54 void set_cycle_start_time(int64_t cycle_start_time);
55 int64_t cycle_start_time();
56 void set_cycle_index(int64_t cycle_index);
57 int64_t cycle_index();
58 bool PacketsInFlightHasDecreased(int64_t target_value);
59 void CalculatePacingRate();
60 void CalculateCongestionWindow();
61
62 private:
63 int64_t last_min_rtt_evaluation_time_;
64 int64_t time_min_cwnd_started_;
65 int64_t cwnd_;
66 int64_t secondary_cwnd_;
67 int64_t pacing_rate_;
68 int64_t max_bdw_;
69 int64_t min_rtt_;
70 int64_t bdp_;
71 int64_t delivered_;
72 int64_t delivered_time_;
73 int64_t delivery_rate_;
74 int64_t bytes_acked_;
75 int64_t min_rtt_time_;
76 float pacing_gain_;
77 int64_t inflight_;
78 };
79 } // namespace bwe
80 } // namespace testing
81 } // namespace webrtc
82
83 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_STATS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698