OLD | NEW |
---|---|
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #ifndef NET_QUIC_QUIC_CONNECTION_LOGGER_H_ | 5 #ifndef NET_QUIC_QUIC_CONNECTION_LOGGER_H_ |
6 #define NET_QUIC_QUIC_CONNECTION_LOGGER_H_ | 6 #define NET_QUIC_QUIC_CONNECTION_LOGGER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <bitset> | 10 #include <bitset> |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
77 void OnSuccessfulVersionNegotiation(const QuicVersion& version) override; | 77 void OnSuccessfulVersionNegotiation(const QuicVersion& version) override; |
78 void OnRttChanged(QuicTime::Delta rtt) const override; | 78 void OnRttChanged(QuicTime::Delta rtt) const override; |
79 | 79 |
80 void OnCryptoHandshakeMessageReceived(const CryptoHandshakeMessage& message); | 80 void OnCryptoHandshakeMessageReceived(const CryptoHandshakeMessage& message); |
81 void OnCryptoHandshakeMessageSent(const CryptoHandshakeMessage& message); | 81 void OnCryptoHandshakeMessageSent(const CryptoHandshakeMessage& message); |
82 void UpdateReceivedFrameCounts(QuicStreamId stream_id, | 82 void UpdateReceivedFrameCounts(QuicStreamId stream_id, |
83 int num_frames_received, | 83 int num_frames_received, |
84 int num_duplicate_frames_received); | 84 int num_duplicate_frames_received); |
85 void OnCertificateVerified(const CertVerifyResult& result); | 85 void OnCertificateVerified(const CertVerifyResult& result); |
86 | 86 |
87 // Returns connection's overall packet loss rate in fraction. | |
Buck
2016/09/07 22:54:16
Not a big deal, but not obvious to me why only rem
Ryan Hamilton
2016/09/07 23:02:37
Thanks. I added it back. I accidentally removed it
| |
88 float ReceivedPacketLossRate() const; | 87 float ReceivedPacketLossRate() const; |
89 | 88 |
90 private: | 89 private: |
91 // Do a factory get for a histogram to record a 6-packet loss-sequence as a | 90 // Do a factory get for a histogram to record a 6-packet loss-sequence as a |
92 // sample. The histogram will record the 64 distinct possible combinations. | 91 // sample. The histogram will record the 64 distinct possible combinations. |
93 // |which_6| is used to adjust the name of the histogram to distinguish the | 92 // |which_6| is used to adjust the name of the histogram to distinguish the |
94 // first 6 packets in a connection, vs. some later 6 packets. | 93 // first 6 packets in a connection, vs. some later 6 packets. |
95 base::HistogramBase* Get6PacketHistogram(const char* which_6) const; | 94 base::HistogramBase* Get6PacketHistogram(const char* which_6) const; |
96 // For connections longer than 21 received packets, this call will calculate | 95 // For connections longer than 21 received packets, this call will calculate |
97 // the overall packet loss rate, and record it into a histogram. | 96 // the overall packet loss rate, and record it into a histogram. |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
155 // Receives notifications regarding the performance of the underlying socket | 154 // Receives notifications regarding the performance of the underlying socket |
156 // for the QUIC connection. May be null. | 155 // for the QUIC connection. May be null. |
157 const std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher_; | 156 const std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher_; |
158 | 157 |
159 DISALLOW_COPY_AND_ASSIGN(QuicConnectionLogger); | 158 DISALLOW_COPY_AND_ASSIGN(QuicConnectionLogger); |
160 }; | 159 }; |
161 | 160 |
162 } // namespace net | 161 } // namespace net |
163 | 162 |
164 #endif // NET_QUIC_QUIC_CONNECTION_LOGGER_H_ | 163 #endif // NET_QUIC_QUIC_CONNECTION_LOGGER_H_ |
OLD | NEW |