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

Side by Side Diff: net/quic/core/congestion_control/rtt_stats.cc

Issue 2566703002: Various formatting cleanups to net/quic/core/frames (Closed)
Patch Set: Fix Created 4 years 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 #include "net/quic/core/congestion_control/rtt_stats.h" 5 #include "net/quic/core/congestion_control/rtt_stats.h"
6 6
7 #include <cstdlib> // std::abs 7 #include <cstdlib> // std::abs
8 8
9 #include "net/quic/core/quic_flags.h"
10
11
12 namespace net { 9 namespace net {
13 10
14 namespace { 11 namespace {
15 12
16 // Default initial rtt used before any samples are received. 13 // Default initial rtt used before any samples are received.
17 const int kInitialRttMs = 100; 14 const int kInitialRttMs = 100;
18 const float kAlpha = 0.125f; 15 const float kAlpha = 0.125f;
19 const float kOneMinusAlpha = (1 - kAlpha); 16 const float kOneMinusAlpha = (1 - kAlpha);
20 const float kBeta = 0.25f; 17 const float kBeta = 0.25f;
21 const float kOneMinusBeta = (1 - kBeta); 18 const float kOneMinusBeta = (1 - kBeta);
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 80
84 void RttStats::OnConnectionMigration() { 81 void RttStats::OnConnectionMigration() {
85 latest_rtt_ = QuicTime::Delta::Zero(); 82 latest_rtt_ = QuicTime::Delta::Zero();
86 min_rtt_ = QuicTime::Delta::Zero(); 83 min_rtt_ = QuicTime::Delta::Zero();
87 smoothed_rtt_ = QuicTime::Delta::Zero(); 84 smoothed_rtt_ = QuicTime::Delta::Zero();
88 mean_deviation_ = QuicTime::Delta::Zero(); 85 mean_deviation_ = QuicTime::Delta::Zero();
89 initial_rtt_us_ = kInitialRttMs * kNumMicrosPerMilli; 86 initial_rtt_us_ = kInitialRttMs * kNumMicrosPerMilli;
90 } 87 }
91 88
92 } // namespace net 89 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/congestion_control/rtt_stats.h ('k') | net/quic/core/congestion_control/rtt_stats_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698