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

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

Issue 2966403002: Added implementation of three classes in BBR,with unit-tests. (Closed)
Patch Set: Added logic for entering/exiting modes in BBR, added new bandwidth filter. 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.cc
diff --git a/webrtc/modules/remote_bitrate_estimator/test/estimators/congestion_window.cc b/webrtc/modules/remote_bitrate_estimator/test/estimators/congestion_window.cc
index a52d17d7111e7d3d4084ab7bf4f61477140a7d5e..82d5b7b75b82465e93a163f123ab5db4f73d64f0 100644
--- a/webrtc/modules/remote_bitrate_estimator/test/estimators/congestion_window.cc
+++ b/webrtc/modules/remote_bitrate_estimator/test/estimators/congestion_window.cc
@@ -33,15 +33,13 @@ CongestionWindow::CongestionWindow() : data_inflight_bytes_(0) {}
CongestionWindow::~CongestionWindow() {}
-int CongestionWindow::GetCongestionWindow(
- BbrBweSender::Mode mode,
- int64_t bandwidth_estimate_bytes_per_ms,
- int64_t min_rtt_ms,
- float gain) {
+int CongestionWindow::GetCongestionWindow(BbrBweSender::Mode mode,
+ int64_t bandwidth_estimate_bps,
+ rtc::Optional<int64_t> min_rtt_ms,
+ float gain) {
if (mode == BbrBweSender::PROBE_RTT)
return kMinimumCongestionWindow;
- return GetTargetCongestionWindow(bandwidth_estimate_bytes_per_ms, min_rtt_ms,
- gain);
+ return GetTargetCongestionWindow(bandwidth_estimate_bps, min_rtt_ms, gain);
}
void CongestionWindow::PacketSent(size_t sent_packet_size_bytes) {
@@ -53,10 +51,10 @@ void CongestionWindow::AckReceived(size_t received_packet_size_bytes) {
}
int CongestionWindow::GetTargetCongestionWindow(
- int64_t bandwidth_estimate_bytes_per_ms,
- int64_t min_rtt_ms,
+ int64_t bandwidth_estimate_bps,
+ rtc::Optional<int64_t> min_rtt_ms,
float gain) {
- int bdp = min_rtt_ms * bandwidth_estimate_bytes_per_ms;
+ int bdp = *min_rtt_ms * bandwidth_estimate_bps;
int congestion_window = bdp * gain;
// Congestion window could be zero in rare cases, when either no bandwidth
// estimate is available, or path's min_rtt value is zero.

Powered by Google App Engine
This is Rietveld 408576698