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