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

Unified 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: Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/remote_bitrate_estimator/test/estimators/stats.h
diff --git a/webrtc/modules/remote_bitrate_estimator/test/estimators/stats.h b/webrtc/modules/remote_bitrate_estimator/test/estimators/stats.h
new file mode 100644
index 0000000000000000000000000000000000000000..317337204b3309bf00f160dda57b2aba00a0ad20
--- /dev/null
+++ b/webrtc/modules/remote_bitrate_estimator/test/estimators/stats.h
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ *
+ */
+
+#ifndef WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_STATS_H_
+#define WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_STATS_H_
+
+namespace webrtc {
+namespace testing {
+namespace bwe {
+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.
+ public:
+ Data();
+ virtual ~Data();
+
+ int64_t last_min_rtt_evaluation_time() {
+ return last_min_rtt_evaluation_time_;
+ }
+ int64_t time_min_cwnd_started() { return time_min_cwnd_started_; }
+ int64_t cwnd() { return cwnd_; }
+ void set_cwnd(int cwnd) { cwnd_ = cwnd; }
+ int64_t secondary_cwnd() { return secondary_cwnd_; }
+ void set_secondary_cwnd(int64_t secondary_cwnd) {
+ secondary_cwnd_ = secondary_cwnd;
+ }
+ bool DeliveryRateGrows();
+ int64_t pacing_rate() { return pacing_rate_; }
+ void set_pacing_rate(int pacing_rate) { pacing_rate_ = pacing_rate; }
+ int64_t min_rtt() { return min_rtt_; }
+ void set_min_rtt(int64_t min_rtt) { min_rtt_ = min_rtt; }
+ void set_min_rtt_time(int64_t min_rtt_time) { min_rtt_time_ = min_rtt_time; }
+ int64_t min_rtt_time() { return min_rtt_time_; }
+ void UpdateMinRtt(int64_t rtt);
+ int64_t GetTargetCwnd();
+ void set_bdp(int64_t bdp) { bdp_ = bdp; }
+ int64_t max_bdw() { return max_bdw_; }
+ int64_t delivered() { return delivered_; }
+ void AddDelivered(int64_t payload);
+ int64_t delivered_time() { return delivered_time_; }
+ void set_delivered_time(int64_t delivered_time) {
+ delivered_time_ = delivered_time;
+ }
+ void set_delivery_rate(int64_t delivery_rate) {
+ delivery_rate_ = delivery_rate;
+ }
+ void set_pacing_gain(float pacing_gain) { pacing_gain_ = pacing_gain; }
+ int64_t bytes_acked() { return bytes_acked_; }
+ int64_t inflight() { return inflight_; }
+ void AddBandwidth(int64_t bandwidth);
+ void set_cycle_start_time(int64_t cycle_start_time);
+ int64_t cycle_start_time();
+ void set_cycle_index(int64_t cycle_index);
+ int64_t cycle_index();
+ bool PacketsInFlightHasDecreased(int64_t target_value);
+ void CalculatePacingRate();
+ void CalculateCongestionWindow();
+
+ private:
+ int64_t last_min_rtt_evaluation_time_;
+ int64_t time_min_cwnd_started_;
+ int64_t cwnd_;
+ int64_t secondary_cwnd_;
+ int64_t pacing_rate_;
+ int64_t max_bdw_;
+ int64_t min_rtt_;
+ int64_t bdp_;
+ int64_t delivered_;
+ int64_t delivered_time_;
+ int64_t delivery_rate_;
+ int64_t bytes_acked_;
+ int64_t min_rtt_time_;
+ float pacing_gain_;
+ int64_t inflight_;
+};
+} // namespace bwe
+} // namespace testing
+} // namespace webrtc
+
+#endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_STATS_H_

Powered by Google App Engine
This is Rietveld 408576698