| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/core/congestion_control/bbr_sender.h" | 5 #include "net/quic/core/congestion_control/bbr_sender.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 competing_receiver_(&simulator_, | 86 competing_receiver_(&simulator_, |
| 87 "Competing receiver", | 87 "Competing receiver", |
| 88 "Competing sender", | 88 "Competing sender", |
| 89 Perspective::IS_SERVER, | 89 Perspective::IS_SERVER, |
| 90 /*connection_id=*/GetPeerInMemoryConnectionId(43)), | 90 /*connection_id=*/GetPeerInMemoryConnectionId(43)), |
| 91 receiver_multiplexer_("Receiver multiplexer", | 91 receiver_multiplexer_("Receiver multiplexer", |
| 92 {&receiver_, &competing_receiver_}) { | 92 {&receiver_, &competing_receiver_}) { |
| 93 // These will be changed by the appropriate tests as necessary. | 93 // These will be changed by the appropriate tests as necessary. |
| 94 FLAGS_quic_reloadable_flag_quic_bbr_slow_recent_delivery = false; | 94 FLAGS_quic_reloadable_flag_quic_bbr_slow_recent_delivery = false; |
| 95 FLAGS_quic_reloadable_flag_quic_bbr_add_tso_cwnd = false; | 95 FLAGS_quic_reloadable_flag_quic_bbr_add_tso_cwnd = false; |
| 96 // TODO(ianswett): Determine why tests become flaky with CWND based on SRTT. | 96 |
| 97 FLAGS_quic_reloadable_flag_quic_bbr_base_cwnd_on_srtt = false; | |
| 98 FLAGS_quic_reloadable_flag_quic_bbr_extra_conservation = true; | 97 FLAGS_quic_reloadable_flag_quic_bbr_extra_conservation = true; |
| 99 FLAGS_quic_reloadable_flag_quic_bbr_fix_conservation2 = true; | 98 FLAGS_quic_reloadable_flag_quic_bbr_fix_conservation2 = true; |
| 99 |
| 100 rtt_stats_ = bbr_sender_.connection()->sent_packet_manager().GetRttStats(); | 100 rtt_stats_ = bbr_sender_.connection()->sent_packet_manager().GetRttStats(); |
| 101 sender_ = SetupBbrSender(&bbr_sender_); | 101 sender_ = SetupBbrSender(&bbr_sender_); |
| 102 | 102 |
| 103 clock_ = simulator_.GetClock(); | 103 clock_ = simulator_.GetClock(); |
| 104 simulator_.set_random_generator(&random_); | 104 simulator_.set_random_generator(&random_); |
| 105 | 105 |
| 106 uint64_t seed = QuicRandom::GetInstance()->RandUint64(); | 106 uint64_t seed = QuicRandom::GetInstance()->RandUint64(); |
| 107 random_.set_seed(seed); | 107 random_.set_seed(seed); |
| 108 QUIC_LOG(INFO) << "BbrSenderTest simulator set up. Seed: " << seed; | 108 QUIC_LOG(INFO) << "BbrSenderTest simulator set up. Seed: " << seed; |
| 109 } | 109 } |
| (...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 745 sender_->ResumeConnectionState(params, false); | 745 sender_->ResumeConnectionState(params, false); |
| 746 EXPECT_EQ(kTestLinkBandwidth, sender_->ExportDebugState().max_bandwidth); | 746 EXPECT_EQ(kTestLinkBandwidth, sender_->ExportDebugState().max_bandwidth); |
| 747 EXPECT_EQ(kTestLinkBandwidth, sender_->BandwidthEstimate()); | 747 EXPECT_EQ(kTestLinkBandwidth, sender_->BandwidthEstimate()); |
| 748 ExpectApproxEq(kTestRtt, sender_->ExportDebugState().min_rtt, 0.01f); | 748 ExpectApproxEq(kTestRtt, sender_->ExportDebugState().min_rtt, 0.01f); |
| 749 | 749 |
| 750 DriveOutOfStartup(); | 750 DriveOutOfStartup(); |
| 751 } | 751 } |
| 752 | 752 |
| 753 } // namespace test | 753 } // namespace test |
| 754 } // namespace net | 754 } // namespace net |
| OLD | NEW |