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

Side by Side Diff: net/quic/congestion_control/rtt_stats.h

Issue 411823002: Land Recent QUIC Changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase TOT Created 6 years, 4 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 | « no previous file | net/quic/congestion_control/rtt_stats.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 // A convenience class to store rtt samples and calculate smoothed rtt. 5 // A convenience class to store rtt samples and calculate smoothed rtt.
6 6
7 #ifndef NET_QUIC_CONGESTION_CONTROL_RTT_STATS_H_ 7 #ifndef NET_QUIC_CONGESTION_CONTROL_RTT_STATS_H_
8 #define NET_QUIC_CONGESTION_CONTROL_RTT_STATS_H_ 8 #define NET_QUIC_CONGESTION_CONTROL_RTT_STATS_H_
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 14 matching lines...) Expand all
25 25
26 // Returns true if any RTT measurements have been made. 26 // Returns true if any RTT measurements have been made.
27 bool HasUpdates() const; 27 bool HasUpdates() const;
28 28
29 // Updates the RTT from an incoming ack which is received |send_delta| after 29 // Updates the RTT from an incoming ack which is received |send_delta| after
30 // the packet is sent and the peer reports the ack being delayed |ack_delay|. 30 // the packet is sent and the peer reports the ack being delayed |ack_delay|.
31 void UpdateRtt(QuicTime::Delta send_delta, 31 void UpdateRtt(QuicTime::Delta send_delta,
32 QuicTime::Delta ack_delay, 32 QuicTime::Delta ack_delay,
33 QuicTime now); 33 QuicTime now);
34 34
35 // Causes the smoothed_rtt to be increased to the latest_rtt and the 35 // Causes the smoothed_rtt to be increased to the latest_rtt if the latest_rtt
36 // mean_variance to be increased to the most recent variance. 36 // is larger. The mean deviation is increased to the most recent deviation if
37 // it's larger.
37 void ExpireSmoothedMetrics(); 38 void ExpireSmoothedMetrics();
38 39
39 // Forces RttStats to sample a new recent min rtt within the next 40 // Forces RttStats to sample a new recent min rtt within the next
40 // |num_samples| UpdateRtt calls. 41 // |num_samples| UpdateRtt calls.
41 void SampleNewRecentMinRtt(uint32 num_samples); 42 void SampleNewRecentMinRtt(uint32 num_samples);
42 43
43 QuicTime::Delta SmoothedRtt() const; 44 QuicTime::Delta SmoothedRtt() const;
44 45
45 int64 initial_rtt_us() const { 46 int64 initial_rtt_us() const {
46 return initial_rtt_us_; 47 return initial_rtt_us_;
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 RttSample recent_min_rtt_; // a in the windowed algorithm. 108 RttSample recent_min_rtt_; // a in the windowed algorithm.
108 RttSample half_window_rtt_; // b in the sampled algorithm. 109 RttSample half_window_rtt_; // b in the sampled algorithm.
109 RttSample quarter_window_rtt_; // c in the sampled algorithm. 110 RttSample quarter_window_rtt_; // c in the sampled algorithm.
110 111
111 DISALLOW_COPY_AND_ASSIGN(RttStats); 112 DISALLOW_COPY_AND_ASSIGN(RttStats);
112 }; 113 };
113 114
114 } // namespace net 115 } // namespace net
115 116
116 #endif // NET_QUIC_CONGESTION_CONTROL_RTT_STATS_H_ 117 #endif // NET_QUIC_CONGESTION_CONTROL_RTT_STATS_H_
OLDNEW
« no previous file with comments | « no previous file | net/quic/congestion_control/rtt_stats.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698