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

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

Issue 1437023002: Landing Recent QUIC changes until 2015-11-09 20:32 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
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 20 matching lines...) Expand all
31 31
32 // Causes the smoothed_rtt to be increased to the latest_rtt if the latest_rtt 32 // Causes the smoothed_rtt to be increased to the latest_rtt if the latest_rtt
33 // is larger. The mean deviation is increased to the most recent deviation if 33 // is larger. The mean deviation is increased to the most recent deviation if
34 // it's larger. 34 // it's larger.
35 void ExpireSmoothedMetrics(); 35 void ExpireSmoothedMetrics();
36 36
37 // Forces RttStats to sample a new recent min rtt within the next 37 // Forces RttStats to sample a new recent min rtt within the next
38 // |num_samples| UpdateRtt calls. 38 // |num_samples| UpdateRtt calls.
39 void SampleNewRecentMinRtt(uint32 num_samples); 39 void SampleNewRecentMinRtt(uint32 num_samples);
40 40
41 // Called when connection migrates and rtt measurement needs to be reset.
42 void OnConnectionMigration() {}
43
41 // Returns the EWMA smoothed RTT for the connection. 44 // Returns the EWMA smoothed RTT for the connection.
42 // May return Zero if no valid updates have occurred. 45 // May return Zero if no valid updates have occurred.
43 QuicTime::Delta smoothed_rtt() const { 46 QuicTime::Delta smoothed_rtt() const {
44 return smoothed_rtt_; 47 return smoothed_rtt_;
45 } 48 }
46 49
47 int64 initial_rtt_us() const { 50 int64 initial_rtt_us() const {
48 return initial_rtt_us_; 51 return initial_rtt_us_;
49 } 52 }
50 53
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 RttSample recent_min_rtt_; // a in the windowed algorithm. 119 RttSample recent_min_rtt_; // a in the windowed algorithm.
117 RttSample half_window_rtt_; // b in the sampled algorithm. 120 RttSample half_window_rtt_; // b in the sampled algorithm.
118 RttSample quarter_window_rtt_; // c in the sampled algorithm. 121 RttSample quarter_window_rtt_; // c in the sampled algorithm.
119 122
120 DISALLOW_COPY_AND_ASSIGN(RttStats); 123 DISALLOW_COPY_AND_ASSIGN(RttStats);
121 }; 124 };
122 125
123 } // namespace net 126 } // namespace net
124 127
125 #endif // NET_QUIC_CONGESTION_CONTROL_RTT_STATS_H_ 128 #endif // NET_QUIC_CONGESTION_CONTROL_RTT_STATS_H_
OLDNEW
« no previous file with comments | « net/quic/congestion_control/pacing_sender.h ('k') | net/quic/congestion_control/send_algorithm_interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698