| 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 <ostream> | 8 #include <ostream> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "net/base/net_export.h" | 11 #include "net/base/net_export.h" |
| 12 #include "net/quic/quic_bandwidth.h" |
| 13 #include "net/quic/quic_protocol.h" |
| 12 #include "net/quic/quic_time.h" | 14 #include "net/quic/quic_time.h" |
| 13 | 15 |
| 14 namespace net { | 16 namespace net { |
| 15 // Structure to hold stats for a QuicConnection. | 17 // Structure to hold stats for a QuicConnection. |
| 16 struct NET_EXPORT_PRIVATE QuicConnectionStats { | 18 struct NET_EXPORT_PRIVATE QuicConnectionStats { |
| 17 QuicConnectionStats(); | 19 QuicConnectionStats(); |
| 18 ~QuicConnectionStats(); | 20 ~QuicConnectionStats(); |
| 19 | 21 |
| 20 NET_EXPORT_PRIVATE friend std::ostream& operator<<( | 22 NET_EXPORT_PRIVATE friend std::ostream& operator<<( |
| 21 std::ostream& os, const QuicConnectionStats& s); | 23 std::ostream& os, const QuicConnectionStats& s); |
| 22 | 24 |
| 23 uint64 bytes_sent; // Includes retransmissions, fec. | 25 QuicByteCount bytes_sent; // Includes retransmissions, fec. |
| 24 uint32 packets_sent; | 26 QuicPacketCount packets_sent; |
| 25 uint64 stream_bytes_sent; // non-retransmitted bytes sent in a stream frame. | 27 // Non-retransmitted bytes sent in a stream frame. |
| 26 uint32 packets_discarded; // Packets serialized and discarded before sending. | 28 QuicByteCount stream_bytes_sent; |
| 29 // Packets serialized and discarded before sending. |
| 30 QuicPacketCount packets_discarded; |
| 27 | 31 |
| 28 // These include version negotiation and public reset packets, which do not | 32 // These include version negotiation and public reset packets, which do not |
| 29 // have sequence numbers or frame data. | 33 // have sequence numbers or frame data. |
| 30 uint64 bytes_received; // Includes duplicate data for a stream, fec. | 34 QuicByteCount bytes_received; // Includes duplicate data for a stream, fec. |
| 31 uint32 packets_received; // Includes packets which were not processable. | 35 // Includes packets which were not processable. |
| 32 uint32 packets_processed; // Excludes packets which were not processable. | 36 QuicPacketCount packets_received; |
| 33 uint64 stream_bytes_received; // Bytes received in a stream frame. | 37 // Excludes packets which were not processable. |
| 38 QuicPacketCount packets_processed; |
| 39 QuicByteCount stream_bytes_received; // Bytes received in a stream frame. |
| 34 | 40 |
| 35 uint64 bytes_retransmitted; | 41 QuicByteCount bytes_retransmitted; |
| 36 uint32 packets_retransmitted; | 42 QuicPacketCount packets_retransmitted; |
| 37 | 43 |
| 38 uint64 bytes_spuriously_retransmitted; | 44 QuicByteCount bytes_spuriously_retransmitted; |
| 39 uint32 packets_spuriously_retransmitted; | 45 QuicPacketCount packets_spuriously_retransmitted; |
| 40 // Number of packets abandoned as lost by the loss detection algorithm. | 46 // Number of packets abandoned as lost by the loss detection algorithm. |
| 41 uint32 packets_lost; | 47 QuicPacketCount packets_lost; |
| 42 uint32 slowstart_packets_lost; // Number of packets lost exiting slow start. | 48 // Number of packets lost exiting slow start. |
| 49 QuicPacketCount slowstart_packets_lost; |
| 43 | 50 |
| 44 uint32 packets_revived; | 51 QuicPacketCount packets_revived; |
| 45 uint32 packets_dropped; // Duplicate or less than least unacked. | 52 QuicPacketCount packets_dropped; // Duplicate or less than least unacked. |
| 46 uint32 crypto_retransmit_count; | 53 uint32 crypto_retransmit_count; |
| 47 // Count of times the loss detection alarm fired. At least one packet should | 54 // Count of times the loss detection alarm fired. At least one packet should |
| 48 // be lost when the alarm fires. | 55 // be lost when the alarm fires. |
| 49 uint32 loss_timeout_count; | 56 uint32 loss_timeout_count; |
| 50 uint32 tlp_count; | 57 size_t tlp_count; |
| 51 uint32 rto_count; // Count of times the rto timer fired. | 58 size_t rto_count; // Count of times the rto timer fired. |
| 52 uint32 spurious_rto_count; | 59 size_t spurious_rto_count; |
| 53 | 60 |
| 54 int64 min_rtt_us; // Minimum RTT in microseconds. | 61 int64 min_rtt_us; // Minimum RTT in microseconds. |
| 55 int64 srtt_us; // Smoothed RTT in microseconds. | 62 int64 srtt_us; // Smoothed RTT in microseconds. |
| 56 uint32 max_packet_size; // In bytes. | 63 QuicByteCount max_packet_size; |
| 57 uint64 estimated_bandwidth; // In bytes per second. | 64 QuicBandwidth estimated_bandwidth; |
| 58 | 65 |
| 59 // Reordering stats for received packets. | 66 // Reordering stats for received packets. |
| 60 // Number of packets received out of sequence number order. | 67 // Number of packets received out of sequence number order. |
| 61 uint32 packets_reordered; | 68 QuicPacketCount packets_reordered; |
| 62 // Maximum reordering observed in sequence space. | 69 // Maximum reordering observed in sequence space. |
| 63 uint32 max_sequence_reordering; | 70 QuicPacketSequenceNumber max_sequence_reordering; |
| 64 // Maximum reordering observed in microseconds | 71 // Maximum reordering observed in microseconds |
| 65 int64 max_time_reordering_us; | 72 int64 max_time_reordering_us; |
| 66 | 73 |
| 67 // The following stats are used only in TcpCubicSender. | 74 // The following stats are used only in TcpCubicSender. |
| 68 // The number of loss events from TCP's perspective. Each loss event includes | 75 // The number of loss events from TCP's perspective. Each loss event includes |
| 69 // one or more lost packets. | 76 // one or more lost packets. |
| 70 uint32 tcp_loss_events; | 77 uint32 tcp_loss_events; |
| 71 // Total amount of cwnd increase by TCPCubic in congestion avoidance. | 78 // Total amount of cwnd increase by TCPCubic in congestion avoidance. |
| 72 uint32 cwnd_increase_congestion_avoidance; | 79 QuicPacketCount cwnd_increase_congestion_avoidance; |
| 73 // Total amount of cwnd increase by TCPCubic in cubic mode. | 80 // Total amount of cwnd increase by TCPCubic in cubic mode. |
| 74 uint32 cwnd_increase_cubic_mode; | 81 QuicPacketCount cwnd_increase_cubic_mode; |
| 75 | 82 |
| 76 // Creation time, as reported by the QuicClock. | 83 // Creation time, as reported by the QuicClock. |
| 77 QuicTime connection_creation_time; | 84 QuicTime connection_creation_time; |
| 78 }; | 85 }; |
| 79 | 86 |
| 80 } // namespace net | 87 } // namespace net |
| 81 | 88 |
| 82 #endif // NET_QUIC_QUIC_CONNECTION_STATS_H_ | 89 #endif // NET_QUIC_QUIC_CONNECTION_STATS_H_ |
| OLD | NEW |