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