OLD | NEW |
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/quic_sustained_bandwidth_recorder.h" | 5 #include "net/quic/core/quic_sustained_bandwidth_recorder.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "net/quic/quic_bandwidth.h" | 8 #include "net/quic/core/quic_bandwidth.h" |
9 #include "net/quic/quic_time.h" | 9 #include "net/quic/core/quic_time.h" |
10 | 10 |
11 namespace net { | 11 namespace net { |
12 | 12 |
13 QuicSustainedBandwidthRecorder::QuicSustainedBandwidthRecorder() | 13 QuicSustainedBandwidthRecorder::QuicSustainedBandwidthRecorder() |
14 : has_estimate_(false), | 14 : has_estimate_(false), |
15 is_recording_(false), | 15 is_recording_(false), |
16 bandwidth_estimate_recorded_during_slow_start_(false), | 16 bandwidth_estimate_recorded_during_slow_start_(false), |
17 bandwidth_estimate_(QuicBandwidth::Zero()), | 17 bandwidth_estimate_(QuicBandwidth::Zero()), |
18 max_bandwidth_estimate_(QuicBandwidth::Zero()), | 18 max_bandwidth_estimate_(QuicBandwidth::Zero()), |
19 max_bandwidth_timestamp_(0), | 19 max_bandwidth_timestamp_(0), |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 // Check for an increase in max bandwidth. | 52 // Check for an increase in max bandwidth. |
53 if (bandwidth > max_bandwidth_estimate_) { | 53 if (bandwidth > max_bandwidth_estimate_) { |
54 max_bandwidth_estimate_ = bandwidth; | 54 max_bandwidth_estimate_ = bandwidth; |
55 max_bandwidth_timestamp_ = wall_time.ToUNIXSeconds(); | 55 max_bandwidth_timestamp_ = wall_time.ToUNIXSeconds(); |
56 DVLOG(1) << "New max bandwidth estimate (KBytes/s): " | 56 DVLOG(1) << "New max bandwidth estimate (KBytes/s): " |
57 << max_bandwidth_estimate_.ToKBytesPerSecond(); | 57 << max_bandwidth_estimate_.ToKBytesPerSecond(); |
58 } | 58 } |
59 } | 59 } |
60 | 60 |
61 } // namespace net | 61 } // namespace net |
OLD | NEW |