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

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

Issue 1030083002: Populate slowstart numbers in stats. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Add_QUIC_connection_option_BWMX_89046643
Patch Set: Created 5 years, 9 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
« no previous file with comments | « net/quic/congestion_control/tcp_cubic_bytes_sender.cc ('k') | net/quic/quic_connection_stats.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "net/quic/congestion_control/prr_sender.h" 10 #include "net/quic/congestion_control/prr_sender.h"
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 congestion_window_count_ = 0; 198 congestion_window_count_ = 0;
199 DVLOG(1) << "Incoming loss; congestion window: " << congestion_window_ 199 DVLOG(1) << "Incoming loss; congestion window: " << congestion_window_
200 << " slowstart threshold: " << slowstart_threshold_; 200 << " slowstart threshold: " << slowstart_threshold_;
201 } 201 }
202 202
203 bool TcpCubicSender::OnPacketSent(QuicTime /*sent_time*/, 203 bool TcpCubicSender::OnPacketSent(QuicTime /*sent_time*/,
204 QuicByteCount /*bytes_in_flight*/, 204 QuicByteCount /*bytes_in_flight*/,
205 QuicPacketSequenceNumber sequence_number, 205 QuicPacketSequenceNumber sequence_number,
206 QuicByteCount bytes, 206 QuicByteCount bytes,
207 HasRetransmittableData is_retransmittable) { 207 HasRetransmittableData is_retransmittable) {
208 if (InSlowStart()) {
209 ++(stats_->slowstart_packets_sent);
210 }
211
208 // Only update bytes_in_flight_ for data packets. 212 // Only update bytes_in_flight_ for data packets.
209 if (is_retransmittable != HAS_RETRANSMITTABLE_DATA) { 213 if (is_retransmittable != HAS_RETRANSMITTABLE_DATA) {
210 return false; 214 return false;
211 } 215 }
212 if (InRecovery()) { 216 if (InRecovery()) {
213 // PRR is used when in recovery. 217 // PRR is used when in recovery.
214 prr_.OnPacketSent(bytes); 218 prr_.OnPacketSent(bytes);
215 } 219 }
216 DCHECK_LT(largest_sent_sequence_number_, sequence_number); 220 DCHECK_LT(largest_sent_sequence_number_, sequence_number);
217 largest_sent_sequence_number_ = sequence_number; 221 largest_sent_sequence_number_ = sequence_number;
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 hybrid_slow_start_.Restart(); 364 hybrid_slow_start_.Restart();
361 slowstart_threshold_ = congestion_window_ / 2; 365 slowstart_threshold_ = congestion_window_ / 2;
362 congestion_window_ = min_congestion_window_; 366 congestion_window_ = min_congestion_window_;
363 } 367 }
364 368
365 CongestionControlType TcpCubicSender::GetCongestionControlType() const { 369 CongestionControlType TcpCubicSender::GetCongestionControlType() const {
366 return reno_ ? kReno : kCubic; 370 return reno_ ? kReno : kCubic;
367 } 371 }
368 372
369 } // namespace net 373 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/congestion_control/tcp_cubic_bytes_sender.cc ('k') | net/quic/quic_connection_stats.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698