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

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

Issue 182523002: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed rch's comments in Patch set 1 of CL 181463007 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/tcp_cubic_sender.h" 5 #include "net/quic/congestion_control/tcp_cubic_sender.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 10
(...skipping 16 matching lines...) Expand all
27 const int kInitialRttMs = 100; // At a typical RTT 100 ms. 27 const int kInitialRttMs = 100; // At a typical RTT 100 ms.
28 const float kAlpha = 0.125f; 28 const float kAlpha = 0.125f;
29 const float kOneMinusAlpha = (1 - kAlpha); 29 const float kOneMinusAlpha = (1 - kAlpha);
30 const float kBeta = 0.25f; 30 const float kBeta = 0.25f;
31 const float kOneMinusBeta = (1 - kBeta); 31 const float kOneMinusBeta = (1 - kBeta);
32 }; // namespace 32 }; // namespace
33 33
34 TcpCubicSender::TcpCubicSender( 34 TcpCubicSender::TcpCubicSender(
35 const QuicClock* clock, 35 const QuicClock* clock,
36 bool reno, 36 bool reno,
37 QuicTcpCongestionWindow max_tcp_congestion_window) 37 QuicTcpCongestionWindow max_tcp_congestion_window,
38 QuicConnectionStats* stats)
38 : hybrid_slow_start_(clock), 39 : hybrid_slow_start_(clock),
39 cubic_(clock), 40 cubic_(clock, stats),
40 reno_(reno), 41 reno_(reno),
41 congestion_window_count_(0), 42 congestion_window_count_(0),
42 receive_window_(kDefaultReceiveWindow), 43 receive_window_(kDefaultReceiveWindow),
43 bytes_in_flight_(0), 44 bytes_in_flight_(0),
44 prr_out_(0), 45 prr_out_(0),
45 prr_delivered_(0), 46 prr_delivered_(0),
46 ack_count_since_loss_(0), 47 ack_count_since_loss_(0),
47 bytes_in_flight_before_loss_(0), 48 bytes_in_flight_before_loss_(0),
48 update_end_sequence_number_(true), 49 update_end_sequence_number_(true),
49 end_sequence_number_(0), 50 end_sequence_number_(0),
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 hybrid_slow_start_.Reset(end_sequence_number_); 363 hybrid_slow_start_.Reset(end_sequence_number_);
363 } 364 }
364 hybrid_slow_start_.Update(rtt, delay_min_); 365 hybrid_slow_start_.Update(rtt, delay_min_);
365 if (hybrid_slow_start_.Exit()) { 366 if (hybrid_slow_start_.Exit()) {
366 slowstart_threshold_ = congestion_window_; 367 slowstart_threshold_ = congestion_window_;
367 } 368 }
368 } 369 }
369 } 370 }
370 371
371 } // namespace net 372 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/congestion_control/tcp_cubic_sender.h ('k') | net/quic/congestion_control/tcp_cubic_sender_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698