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

Unified Diff: net/quic/congestion_control/rtt_stats.cc

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, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/congestion_control/rtt_stats.h ('k') | net/quic/congestion_control/rtt_stats_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/congestion_control/rtt_stats.cc
diff --git a/net/quic/congestion_control/rtt_stats.cc b/net/quic/congestion_control/rtt_stats.cc
index 745deb58cb3d085cbfed94d73585e6f42d5c577a..3225d9f3afc2b0817d23623773ae1aa8e2b93c11 100644
--- a/net/quic/congestion_control/rtt_stats.cc
+++ b/net/quic/congestion_control/rtt_stats.cc
@@ -4,6 +4,8 @@
#include "net/quic/congestion_control/rtt_stats.h"
+using std::max;
+
namespace net {
namespace {
@@ -37,6 +39,11 @@ void RttStats::SampleNewRecentMinRtt(uint32 num_samples) {
new_min_rtt_ = RttSample();
}
+void RttStats::ExpireSmoothedMetrics() {
+ mean_deviation_ = max(mean_deviation_, latest_rtt_.Subtract(smoothed_rtt_));
+ smoothed_rtt_ = max(smoothed_rtt_, latest_rtt_);
+}
+
// Updates the RTT based on a new sample.
void RttStats::UpdateRtt(QuicTime::Delta send_delta,
QuicTime::Delta ack_delay,
« no previous file with comments | « net/quic/congestion_control/rtt_stats.h ('k') | net/quic/congestion_control/rtt_stats_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698