| Index: net/quic/congestion_control/rtt_stats.cc
|
| diff --git a/net/quic/congestion_control/rtt_stats.cc b/net/quic/congestion_control/rtt_stats.cc
|
| index 25e2fbfa5fdb3993ef7ea70dc618c159f6c96bf4..d1f1835f6020c12518904ea012b5c7e1eaec563c 100644
|
| --- a/net/quic/congestion_control/rtt_stats.cc
|
| +++ b/net/quic/congestion_control/rtt_stats.cc
|
| @@ -26,7 +26,8 @@ RttStats::RttStats()
|
| mean_deviation_(QuicTime::Delta::Zero()),
|
| initial_rtt_us_(kInitialRttMs * base::Time::kMicrosecondsPerMillisecond),
|
| num_min_rtt_samples_remaining_(0),
|
| - recent_min_rtt_window_(QuicTime::Delta::Zero()) { }
|
| + recent_min_rtt_window_(QuicTime::Delta::Zero()) {
|
| +}
|
|
|
| bool RttStats::HasUpdates() const {
|
| return !smoothed_rtt_.IsZero();
|
| @@ -68,14 +69,14 @@ void RttStats::UpdateRtt(QuicTime::Delta send_delta,
|
| // First time call.
|
| if (!HasUpdates()) {
|
| smoothed_rtt_ = rtt_sample;
|
| - mean_deviation_ = QuicTime::Delta::FromMicroseconds(
|
| - rtt_sample.ToMicroseconds() / 2);
|
| + mean_deviation_ =
|
| + QuicTime::Delta::FromMicroseconds(rtt_sample.ToMicroseconds() / 2);
|
| } else {
|
| mean_deviation_ = QuicTime::Delta::FromMicroseconds(
|
| kOneMinusBeta * mean_deviation_.ToMicroseconds() +
|
| kBeta * std::abs(smoothed_rtt_.Subtract(rtt_sample).ToMicroseconds()));
|
| - smoothed_rtt_ = smoothed_rtt_.Multiply(kOneMinusAlpha).Add(
|
| - rtt_sample.Multiply(kAlpha));
|
| + smoothed_rtt_ =
|
| + smoothed_rtt_.Multiply(kOneMinusAlpha).Add(rtt_sample.Multiply(kAlpha));
|
| DVLOG(1) << "Cubic; smoothed_rtt(us):" << smoothed_rtt_.ToMicroseconds()
|
| << " mean_deviation(us):" << mean_deviation_.ToMicroseconds();
|
| }
|
| @@ -110,11 +111,11 @@ void RttStats::UpdateRecentMinRtt(QuicTime::Delta rtt_sample, QuicTime now) {
|
| half_window_rtt_ = quarter_window_rtt_;
|
| quarter_window_rtt_ = RttSample(rtt_sample, now);
|
| } else if (half_window_rtt_.time <
|
| - now.Subtract(recent_min_rtt_window_.Multiply(kHalfWindow))) {
|
| + now.Subtract(recent_min_rtt_window_.Multiply(kHalfWindow))) {
|
| half_window_rtt_ = quarter_window_rtt_;
|
| quarter_window_rtt_ = RttSample(rtt_sample, now);
|
| } else if (quarter_window_rtt_.time <
|
| - now.Subtract(recent_min_rtt_window_.Multiply(kQuarterWindow))) {
|
| + now.Subtract(recent_min_rtt_window_.Multiply(kQuarterWindow))) {
|
| quarter_window_rtt_ = RttSample(rtt_sample, now);
|
| }
|
| }
|
|
|