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