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

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

Issue 355573007: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added NET_EXPORT_PRIVATE for ContainsQuicTag Created 6 years, 5 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
« no previous file with comments | « net/quic/congestion_control/pacing_sender.cc ('k') | 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
36 // mean_variance to be increased to the most recent variance.
37 void ExpireSmoothedMetrics();
38
35 // Forces RttStats to sample a new recent min rtt within the next 39 // Forces RttStats to sample a new recent min rtt within the next
36 // |num_samples| UpdateRtt calls. 40 // |num_samples| UpdateRtt calls.
37 void SampleNewRecentMinRtt(uint32 num_samples); 41 void SampleNewRecentMinRtt(uint32 num_samples);
38 42
39 QuicTime::Delta SmoothedRtt() const; 43 QuicTime::Delta SmoothedRtt() const;
40 44
41 int64 initial_rtt_us() const { 45 int64 initial_rtt_us() const {
42 return initial_rtt_us_; 46 return initial_rtt_us_;
43 } 47 }
44 48
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 RttSample recent_min_rtt_; // a in the windowed algorithm. 107 RttSample recent_min_rtt_; // a in the windowed algorithm.
104 RttSample half_window_rtt_; // b in the sampled algorithm. 108 RttSample half_window_rtt_; // b in the sampled algorithm.
105 RttSample quarter_window_rtt_; // c in the sampled algorithm. 109 RttSample quarter_window_rtt_; // c in the sampled algorithm.
106 110
107 DISALLOW_COPY_AND_ASSIGN(RttStats); 111 DISALLOW_COPY_AND_ASSIGN(RttStats);
108 }; 112 };
109 113
110 } // namespace net 114 } // namespace net
111 115
112 #endif // NET_QUIC_CONGESTION_CONTROL_RTT_STATS_H_ 116 #endif // NET_QUIC_CONGESTION_CONTROL_RTT_STATS_H_
OLDNEW
« no previous file with comments | « net/quic/congestion_control/pacing_sender.cc ('k') | net/quic/congestion_control/rtt_stats.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698