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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 static void AddTo21CumulativeHistogram(base::HistogramBase* histogram, | 117 static void AddTo21CumulativeHistogram(base::HistogramBase* histogram, |
118 int bit_mask_of_packets, | 118 int bit_mask_of_packets, |
119 int valid_bits_in_mask); | 119 int valid_bits_in_mask); |
120 // For connections longer than 21 received packets, this call will calculate | 120 // For connections longer than 21 received packets, this call will calculate |
121 // the overall packet loss rate, and record it into a histogram. | 121 // the overall packet loss rate, and record it into a histogram. |
122 void RecordAggregatePacketLossRate() const; | 122 void RecordAggregatePacketLossRate() const; |
123 // At destruction time, this records results of |pacaket_received_| into | 123 // At destruction time, this records results of |pacaket_received_| into |
124 // histograms for specific connection types. | 124 // histograms for specific connection types. |
125 void RecordLossHistograms() const; | 125 void RecordLossHistograms() const; |
126 | 126 |
| 127 // Reports packet receptions to the |socket_performance_watcher_|. |
| 128 void ReportPacketCounts( |
| 129 QuicPacketCount previous_largest_received_packet_number) const; |
| 130 |
127 BoundNetLog net_log_; | 131 BoundNetLog net_log_; |
128 QuicSpdySession* session_; // Unowned. | 132 QuicSpdySession* session_; // Unowned. |
129 // The last packet number received. | 133 // The last packet number received. |
130 QuicPacketNumber last_received_packet_number_; | 134 QuicPacketNumber last_received_packet_number_; |
131 // The size of the most recently received packet. | 135 // The size of the most recently received packet. |
132 size_t last_received_packet_size_; | 136 size_t last_received_packet_size_; |
133 // The size of the previously received packet. | 137 // The size of the previously received packet. |
134 size_t previous_received_packet_size_; | 138 size_t previous_received_packet_size_; |
135 // The timestamp of last packet sent. | 139 // The timestamp of last packet sent. |
136 QuicTime last_packet_sent_time_; | 140 QuicTime last_packet_sent_time_; |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 // Receives notifications regarding the performance of the underlying socket | 192 // Receives notifications regarding the performance of the underlying socket |
189 // for the QUIC connection. May be null. | 193 // for the QUIC connection. May be null. |
190 const scoped_ptr<SocketPerformanceWatcher> socket_performance_watcher_; | 194 const scoped_ptr<SocketPerformanceWatcher> socket_performance_watcher_; |
191 | 195 |
192 DISALLOW_COPY_AND_ASSIGN(QuicConnectionLogger); | 196 DISALLOW_COPY_AND_ASSIGN(QuicConnectionLogger); |
193 }; | 197 }; |
194 | 198 |
195 } // namespace net | 199 } // namespace net |
196 | 200 |
197 #endif // NET_QUIC_QUIC_CONNECTION_LOGGER_H_ | 201 #endif // NET_QUIC_QUIC_CONNECTION_LOGGER_H_ |
OLD | NEW |