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

Side by Side Diff: net/quic/congestion_control/inter_arrival_overuse_detector.cc

Issue 157803007: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win_x64 compiler error fix Created 6 years, 10 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/congestion_control/inter_arrival_overuse_detector.h" 5 #include "net/quic/congestion_control/inter_arrival_overuse_detector.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <stdlib.h> 8 #include <stdlib.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 if (delta_overuse_counter_ > 0 && 156 if (delta_overuse_counter_ > 0 &&
157 accumulated_deltas_.ToMicroseconds() > kThresholdAccumulatedDeltasUs) { 157 accumulated_deltas_.ToMicroseconds() > kThresholdAccumulatedDeltasUs) {
158 if (delta_estimate_ != kBandwidthDraining) { 158 if (delta_estimate_ != kBandwidthDraining) {
159 DVLOG(1) << "Bandwidth estimate drift: Draining buffer(s) " 159 DVLOG(1) << "Bandwidth estimate drift: Draining buffer(s) "
160 << accumulated_deltas_.ToMilliseconds() << " ms"; 160 << accumulated_deltas_.ToMilliseconds() << " ms";
161 delta_estimate_ = kBandwidthDraining; 161 delta_estimate_ = kBandwidthDraining;
162 } 162 }
163 return; 163 return;
164 } 164 }
165 if ((sigma_delta * kDetectTimeDiffStandardDeviation > 165 if ((sigma_delta * kDetectTimeDiffStandardDeviation >
166 estimated_congestion_delay_.ToMicroseconds()) && 166 estimated_congestion_delay_.ToMicroseconds()) &&
167 (sigma_delta * kDetectDriftStandardDeviation > 167 (sigma_delta * kDetectDriftStandardDeviation >
168 abs(accumulated_deltas_.ToMicroseconds()))) { 168 std::abs(accumulated_deltas_.ToMicroseconds()))) {
169 if (delta_estimate_ != kBandwidthSteady) { 169 if (delta_estimate_ != kBandwidthSteady) {
170 DVLOG(1) << "Bandwidth estimate drift: Steady" 170 DVLOG(1) << "Bandwidth estimate drift: Steady"
171 << " mean:" << delta_mean_ 171 << " mean:" << delta_mean_
172 << " sigma:" << sigma_delta 172 << " sigma:" << sigma_delta
173 << " offset:" << send_receive_offset_.ToMicroseconds() 173 << " offset:" << send_receive_offset_.ToMicroseconds()
174 << " delta:" << estimated_congestion_delay_.ToMicroseconds() 174 << " delta:" << estimated_congestion_delay_.ToMicroseconds()
175 << " drift:" << accumulated_deltas_.ToMicroseconds(); 175 << " drift:" << accumulated_deltas_.ToMicroseconds();
176 delta_estimate_ = kBandwidthSteady; 176 delta_estimate_ = kBandwidthSteady;
177 // Reset drift counter. 177 // Reset drift counter.
178 accumulated_deltas_ = QuicTime::Delta::Zero(); 178 accumulated_deltas_ = QuicTime::Delta::Zero();
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 --slope_overuse_counter_; 247 --slope_overuse_counter_;
248 DVLOG(1) << "Bandwidth estimate slope: Under using" 248 DVLOG(1) << "Bandwidth estimate slope: Under using"
249 << " mean:" << delta_mean_ 249 << " mean:" << delta_mean_
250 << " sigma:" << sigma_delta; 250 << " sigma:" << sigma_delta;
251 slope_estimate_ = kBandwidthUnderUsing; 251 slope_estimate_ = kBandwidthUnderUsing;
252 } 252 }
253 } 253 }
254 } 254 }
255 255
256 } // namespace net 256 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/congestion_control/cubic_test.cc ('k') | net/quic/congestion_control/tcp_cubic_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698