| Index: net/quic/congestion_control/tcp_cubic_sender.cc
|
| diff --git a/net/quic/congestion_control/tcp_cubic_sender.cc b/net/quic/congestion_control/tcp_cubic_sender.cc
|
| index 0aae5fdea714c109ed5fbcf3c3aff448fa03d74d..0a0b6ae38bde0cd8344f5d0194f7639c893fd435 100644
|
| --- a/net/quic/congestion_control/tcp_cubic_sender.cc
|
| +++ b/net/quic/congestion_control/tcp_cubic_sender.cc
|
| @@ -204,6 +204,13 @@ QuicByteCount TcpCubicSender::SendWindow() const {
|
| return min(receive_window_, GetCongestionWindow());
|
| }
|
|
|
| +QuicBandwidth TcpCubicSender::PacingRate() const {
|
| + // We pace at twice the rate of the underlying sender's bandwidth estimate
|
| + // during slow start and 1.25x during congestion avoidance to ensure pacing
|
| + // doesn't prevent us from filling the window.
|
| + return BandwidthEstimate().Scale(InSlowStart() ? 2 : 1.25);
|
| +}
|
| +
|
| QuicBandwidth TcpCubicSender::BandwidthEstimate() const {
|
| return QuicBandwidth::FromBytesAndTimeDelta(GetCongestionWindow(),
|
| rtt_stats_->SmoothedRtt());
|
| @@ -217,9 +224,8 @@ QuicTime::Delta TcpCubicSender::RetransmissionDelay() const {
|
| if (!rtt_stats_->HasUpdates()) {
|
| return QuicTime::Delta::Zero();
|
| }
|
| - return QuicTime::Delta::FromMicroseconds(
|
| - rtt_stats_->SmoothedRtt().ToMicroseconds() +
|
| - 4 * rtt_stats_->mean_deviation().ToMicroseconds());
|
| + return rtt_stats_->SmoothedRtt().Add(
|
| + rtt_stats_->mean_deviation().Multiply(4));
|
| }
|
|
|
| QuicByteCount TcpCubicSender::GetCongestionWindow() const {
|
|
|