| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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_STATS_H_ | 5 #ifndef NET_QUIC_QUIC_CONNECTION_STATS_H_ |
| 6 #define NET_QUIC_QUIC_CONNECTION_STATS_H_ | 6 #define NET_QUIC_QUIC_CONNECTION_STATS_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| 11 #include <ostream> | 11 #include <ostream> |
| 12 | 12 |
| 13 #include "net/base/net_export.h" | 13 #include "net/base/net_export.h" |
| 14 #include "net/quic/quic_bandwidth.h" | 14 #include "net/quic/quic_bandwidth.h" |
| 15 #include "net/quic/quic_protocol.h" | 15 #include "net/quic/quic_protocol.h" |
| 16 #include "net/quic/quic_time.h" | 16 #include "net/quic/quic_time.h" |
| 17 | 17 |
| 18 namespace net { | 18 namespace net { |
| 19 // Structure to hold stats for a QuicConnection. | 19 // Structure to hold stats for a QuicConnection. |
| 20 struct NET_EXPORT_PRIVATE QuicConnectionStats { | 20 struct NET_EXPORT_PRIVATE QuicConnectionStats { |
| 21 QuicConnectionStats(); | 21 QuicConnectionStats(); |
| 22 QuicConnectionStats(const QuicConnectionStats& other); | 22 QuicConnectionStats(const QuicConnectionStats& other); |
| 23 ~QuicConnectionStats(); | 23 ~QuicConnectionStats(); |
| 24 | 24 |
| 25 NET_EXPORT_PRIVATE friend std::ostream& operator<<( | 25 NET_EXPORT_PRIVATE friend std::ostream& operator<<( |
| 26 std::ostream& os, | 26 std::ostream& os, |
| 27 const QuicConnectionStats& s); | 27 const QuicConnectionStats& s); |
| 28 | 28 |
| 29 QuicByteCount bytes_sent; // Includes retransmissions, fec. | 29 QuicByteCount bytes_sent; // Includes retransmissions. |
| 30 QuicPacketCount packets_sent; | 30 QuicPacketCount packets_sent; |
| 31 // Non-retransmitted bytes sent in a stream frame. | 31 // Non-retransmitted bytes sent in a stream frame. |
| 32 QuicByteCount stream_bytes_sent; | 32 QuicByteCount stream_bytes_sent; |
| 33 // Packets serialized and discarded before sending. | 33 // Packets serialized and discarded before sending. |
| 34 QuicPacketCount packets_discarded; | 34 QuicPacketCount packets_discarded; |
| 35 | 35 |
| 36 // These include version negotiation and public reset packets, which do not | 36 // These include version negotiation and public reset packets, which do not |
| 37 // have packet numbers or frame data. | 37 // have packet numbers or frame data. |
| 38 QuicByteCount bytes_received; // Includes duplicate data for a stream, fec. | 38 QuicByteCount bytes_received; // Includes duplicate data for a stream. |
| 39 // Includes packets which were not processable. | 39 // Includes packets which were not processable. |
| 40 QuicPacketCount packets_received; | 40 QuicPacketCount packets_received; |
| 41 // Excludes packets which were not processable. | 41 // Excludes packets which were not processable. |
| 42 QuicPacketCount packets_processed; | 42 QuicPacketCount packets_processed; |
| 43 QuicByteCount stream_bytes_received; // Bytes received in a stream frame. | 43 QuicByteCount stream_bytes_received; // Bytes received in a stream frame. |
| 44 | 44 |
| 45 QuicByteCount bytes_retransmitted; | 45 QuicByteCount bytes_retransmitted; |
| 46 QuicPacketCount packets_retransmitted; | 46 QuicPacketCount packets_retransmitted; |
| 47 | 47 |
| 48 QuicByteCount bytes_spuriously_retransmitted; | 48 QuicByteCount bytes_spuriously_retransmitted; |
| 49 QuicPacketCount packets_spuriously_retransmitted; | 49 QuicPacketCount packets_spuriously_retransmitted; |
| 50 // Number of packets abandoned as lost by the loss detection algorithm. | 50 // Number of packets abandoned as lost by the loss detection algorithm. |
| 51 QuicPacketCount packets_lost; | 51 QuicPacketCount packets_lost; |
| 52 | 52 |
| 53 // Number of packets sent in slow start. | 53 // Number of packets sent in slow start. |
| 54 QuicPacketCount slowstart_packets_sent; | 54 QuicPacketCount slowstart_packets_sent; |
| 55 // Number of packets lost exiting slow start. | 55 // Number of packets lost exiting slow start. |
| 56 QuicPacketCount slowstart_packets_lost; | 56 QuicPacketCount slowstart_packets_lost; |
| 57 | 57 |
| 58 QuicPacketCount packets_revived; | |
| 59 QuicPacketCount packets_dropped; // Duplicate or less than least unacked. | 58 QuicPacketCount packets_dropped; // Duplicate or less than least unacked. |
| 60 size_t crypto_retransmit_count; | 59 size_t crypto_retransmit_count; |
| 61 // Count of times the loss detection alarm fired. At least one packet should | 60 // Count of times the loss detection alarm fired. At least one packet should |
| 62 // be lost when the alarm fires. | 61 // be lost when the alarm fires. |
| 63 size_t loss_timeout_count; | 62 size_t loss_timeout_count; |
| 64 size_t tlp_count; | 63 size_t tlp_count; |
| 65 size_t rto_count; // Count of times the rto timer fired. | 64 size_t rto_count; // Count of times the rto timer fired. |
| 66 | 65 |
| 67 int64_t min_rtt_us; // Minimum RTT in microseconds. | 66 int64_t min_rtt_us; // Minimum RTT in microseconds. |
| 68 int64_t srtt_us; // Smoothed RTT in microseconds. | 67 int64_t srtt_us; // Smoothed RTT in microseconds. |
| (...skipping 14 matching lines...) Expand all Loading... |
| 83 // one or more lost packets. | 82 // one or more lost packets. |
| 84 uint32_t tcp_loss_events; | 83 uint32_t tcp_loss_events; |
| 85 | 84 |
| 86 // Creation time, as reported by the QuicClock. | 85 // Creation time, as reported by the QuicClock. |
| 87 QuicTime connection_creation_time; | 86 QuicTime connection_creation_time; |
| 88 }; | 87 }; |
| 89 | 88 |
| 90 } // namespace net | 89 } // namespace net |
| 91 | 90 |
| 92 #endif // NET_QUIC_QUIC_CONNECTION_STATS_H_ | 91 #endif // NET_QUIC_QUIC_CONNECTION_STATS_H_ |
| OLD | NEW |