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

Unified Diff: webrtc/modules/remote_bitrate_estimator/test/estimators/congestion_window.h

Issue 2966403002: Added implementation of three classes in BBR,with unit-tests. (Closed)
Patch Set: Created 3 years, 5 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/congestion_window.h
diff --git a/webrtc/modules/remote_bitrate_estimator/test/estimators/congestion_window.h b/webrtc/modules/remote_bitrate_estimator/test/estimators/congestion_window.h
index 887e096004294a17a2e8dd908d36243a10aaefe5..865e08e762f5df1ea0b5b7848560822108048816 100644
--- a/webrtc/modules/remote_bitrate_estimator/test/estimators/congestion_window.h
+++ b/webrtc/modules/remote_bitrate_estimator/test/estimators/congestion_window.h
@@ -12,22 +12,39 @@
#ifndef WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_CONGESTION_WINDOW_H_
#define WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_CONGESTION_WINDOW_H_
+#include <cstddef>
+#include <cstdint>
philipel 2017/07/06 12:15:15 Do you need to include both of these?
gnish1 2017/07/07 13:43:34 Done.
+
+#include "webrtc/modules/remote_bitrate_estimator/test/estimators/bbr.h"
+
namespace webrtc {
namespace testing {
namespace bwe {
class CongestionWindow {
public:
- void set_gain(float gain);
- size_t data_inflight();
- int64_t GetCongestionWindow();
-
+ CongestionWindow();
+ ~CongestionWindow();
+ int64_t GetCongestionWindow(BbrBweSender::Mode mode,
philipel 2017/07/06 12:15:15 Why int64_t as return type? Can the congestion win
gnish1 2017/07/07 13:43:34 Done.
+ int64_t bandwidth_estimate,
+ int64_t min_rtt,
+ float gain,
+ size_t bytes_acked,
+ int multiplier);
+ int64_t GetTargetCongestionWindow(int64_t bandwidth_estimate,
+ int64_t min_rtt,
+ float gain);
// Packet sent from sender, meaning it is inflight
// until we receive it and we should add packet's size to data_inflight.
- void PacketSent();
+ void PacketSent(size_t sent_packet_size);
// Ack was received by sender, meaning
// packet is no longer inflight.
- void AckReceived();
+ void AckReceived(size_t received_packet_size);
+
+ size_t data_inflight() { return data_inflight_; }
+
+ private:
+ size_t data_inflight_;
};
} // namespace bwe
} // namespace testing

Powered by Google App Engine
This is Rietveld 408576698