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

Unified Diff: net/quic/core/congestion_control/send_algorithm_test.cc

Issue 2566403002: Landing Recent QUIC changes until 3:47 pm, Dec 10, 2016 UTC-8 (Closed)
Patch Set: git cl format net Created 4 years 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: net/quic/core/congestion_control/send_algorithm_test.cc
diff --git a/net/quic/core/congestion_control/send_algorithm_test.cc b/net/quic/core/congestion_control/send_algorithm_test.cc
index 75bacfbb9c460695c08b91a35e9450523d1e0581..c5e5324fcb718fd75f81005dc54f56907018f699 100644
--- a/net/quic/core/congestion_control/send_algorithm_test.cc
+++ b/net/quic/core/congestion_control/send_algorithm_test.cc
@@ -60,7 +60,7 @@ const QuicTime::Delta kLocalPropagationDelay =
const QuicBandwidth kTestLinkWiredBandwidth =
QuicBandwidth::FromKBitsPerSecond(4000);
const QuicTime::Delta kTestLinkWiredPropagationDelay =
- QuicTime::Delta::FromMilliseconds(30);
+ QuicTime::Delta::FromMilliseconds(50);
const QuicTime::Delta kTestWiredTransferTime =
kTestLinkWiredBandwidth.TransferTime(kMaxPacketSize) +
kLocalLinkBandwidth.TransferTime(kMaxPacketSize);
@@ -77,7 +77,7 @@ const QuicByteCount kTestWiredBdp = kTestWiredRtt * kTestLinkWiredBandwidth;
const QuicBandwidth kTestLinkLowBdpBandwidth =
QuicBandwidth::FromKBitsPerSecond(200);
const QuicTime::Delta kTestLinkLowBdpPropagationDelay =
- QuicTime::Delta::FromMilliseconds(30);
+ QuicTime::Delta::FromMilliseconds(50);
const QuicByteCount kTestPolicerQueue = kMaxPacketSize;
// Satellite network settings. In a satellite network, the bottleneck
@@ -168,13 +168,7 @@ class SendAlgorithmTest : public ::testing::TestWithParam<TestParams> {
GetParam().congestion_control_type, &random_, &stats_,
kInitialCongestionWindowPackets);
- if (FLAGS_quic_fix_cubic_convex_mode) {
- QuicConfig client_config;
- QuicTagVector options;
- options.push_back(kCCVX);
- client_config.SetInitialReceivedConnectionOptions(options);
- sender_->SetFromConfig(client_config, Perspective::IS_SERVER);
- }
+ SetExperimentalOptionsInServerConfig();
QuicConnectionPeer::SetSendAlgorithm(quic_sender_.connection(),
kDefaultPathId, sender_);
@@ -187,6 +181,30 @@ class SendAlgorithmTest : public ::testing::TestWithParam<TestParams> {
VLOG(1) << "SendAlgorithmTest simulator set up. Seed: " << seed;
}
+ // Sets experimental options in the server config, as if they had
+ // been sent by the client.
+ void SetExperimentalOptionsInServerConfig() {
+ QuicConfig client_config;
+ QuicTagVector options;
+ if (FLAGS_quic_fix_cubic_convex_mode) {
+ options.push_back(kCCVX);
+ }
+ if (FLAGS_quic_fix_cubic_convex_mode &&
+ FLAGS_quic_fix_cubic_bytes_quantization) {
+ options.push_back(kCCVX);
+ options.push_back(kCBQT);
+ }
+
+ if (FLAGS_quic_fix_beta_last_max) {
+ options.push_back(kBLMX);
+ }
+
+ if (!options.empty()) {
+ client_config.SetInitialReceivedConnectionOptions(options);
+ sender_->SetFromConfig(client_config, Perspective::IS_SERVER);
+ }
+ }
+
// Creates a simulated network, with default settings between the
// sender and the switch and the given settings from the switch to
// the receiver.
@@ -246,8 +264,12 @@ class SendAlgorithmTest : public ::testing::TestWithParam<TestParams> {
}
void PrintTransferStats() {
+ const QuicConnectionStats& stats = quic_sender_.connection()->GetStats();
VLOG(1) << "Summary for scenario " << GetParam();
- VLOG(1) << "Sender stats is " << quic_sender_.connection()->GetStats();
+ VLOG(1) << "Sender stats is " << stats;
+ const double rtx_rate =
+ static_cast<double>(stats.bytes_retransmitted) / stats.bytes_sent;
+ VLOG(1) << "Retransmit rate (num_rtx/num_total_sent): " << rtx_rate;
VLOG(1) << "Connection elapsed time: "
<< (clock_->Now() - QuicSenderStartTime()).ToMilliseconds()
<< " (ms)";
« no previous file with comments | « net/quic/core/congestion_control/send_algorithm_interface.cc ('k') | net/quic/core/congestion_control/tcp_cubic_sender_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698