| 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..0bafc0b8f5f169f404d2d5f83dae63344cd9e0bc 100644
|
| --- a/net/quic/core/congestion_control/send_algorithm_test.cc
|
| +++ b/net/quic/core/congestion_control/send_algorithm_test.cc
|
| @@ -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,26 @@ 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 (!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 +260,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)";
|
|
|