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

Side by Side Diff: net/quic/congestion_control/tcp_cubic_sender_bytes_test.cc

Issue 2005853002: Ignore the peer's receive buffer in QUIC and instead set the max CWND to 2000 packets. Protected b… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@122420070
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/congestion_control/tcp_cubic_sender_bytes.h" 5 #include "net/quic/congestion_control/tcp_cubic_sender_bytes.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cstdint> 8 #include <cstdint>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 EXPECT_EQ(expected_send_window, sender_->GetSlowStartThreshold()); 804 EXPECT_EQ(expected_send_window, sender_->GetSlowStartThreshold());
805 805
806 // Resets cwnd and slow start threshold on connection migrations. 806 // Resets cwnd and slow start threshold on connection migrations.
807 sender_->OnConnectionMigration(); 807 sender_->OnConnectionMigration();
808 EXPECT_EQ(kDefaultWindowTCP, sender_->GetCongestionWindow()); 808 EXPECT_EQ(kDefaultWindowTCP, sender_->GetCongestionWindow());
809 EXPECT_EQ(kMaxCongestionWindowPackets * kDefaultTCPMSS, 809 EXPECT_EQ(kMaxCongestionWindowPackets * kDefaultTCPMSS,
810 sender_->GetSlowStartThreshold()); 810 sender_->GetSlowStartThreshold());
811 EXPECT_FALSE(sender_->hybrid_slow_start().started()); 811 EXPECT_FALSE(sender_->hybrid_slow_start().started());
812 } 812 }
813 813
814 TEST_F(TcpCubicSenderBytesTest, DefaultMaxCwnd) {
815 ValueRestore<bool> old_flag(&FLAGS_quic_ignore_srbf, true);
816 RttStats rtt_stats;
817 QuicConnectionStats stats;
818 std::unique_ptr<SendAlgorithmInterface> sender(SendAlgorithmInterface::Create(
819 &clock_, &rtt_stats, kCubicBytes, &stats, kInitialCongestionWindow));
820
821 SendAlgorithmInterface::CongestionVector acked_packets;
822 SendAlgorithmInterface::CongestionVector missing_packets;
823 for (uint64_t i = 1; i < kDefaultMaxCongestionWindowPackets; ++i) {
824 acked_packets.clear();
825 acked_packets.push_back(std::make_pair(i, 1350));
826 sender->OnCongestionEvent(true, sender->GetCongestionWindow(),
827 acked_packets, missing_packets);
828 }
829 EXPECT_EQ(kDefaultMaxCongestionWindowPackets,
830 sender->GetCongestionWindow() / kDefaultTCPMSS);
831 }
832
814 } // namespace test 833 } // namespace test
815 } // namespace net 834 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/congestion_control/tcp_cubic_sender_bytes.cc ('k') | net/quic/congestion_control/tcp_cubic_sender_packets.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698