ozone: evdev: Sync caps lock LED state to evdev
[chromium-blink-merge.git] / net / quic / quic_connection_stats.h
blob433085ab8e85dbdaba12a23a958642b822ff5775
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.
5 #ifndef NET_QUIC_QUIC_CONNECTION_STATS_H_
6 #define NET_QUIC_QUIC_CONNECTION_STATS_H_
8 #include <ostream>
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"
16 namespace net {
17 // Structure to hold stats for a QuicConnection.
18 struct NET_EXPORT_PRIVATE QuicConnectionStats {
19 QuicConnectionStats();
20 ~QuicConnectionStats();
22 NET_EXPORT_PRIVATE friend std::ostream& operator<<(
23 std::ostream& os, const QuicConnectionStats& s);
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;
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.
41 QuicByteCount bytes_retransmitted;
42 QuicPacketCount packets_retransmitted;
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;
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.
60 int64 min_rtt_us; // Minimum RTT in microseconds.
61 int64 srtt_us; // Smoothed RTT in microseconds.
62 QuicByteCount max_packet_size;
63 QuicBandwidth estimated_bandwidth;
65 // Reordering stats for received packets.
66 // Number of packets received out of sequence number order.
67 QuicPacketCount packets_reordered;
68 // Maximum reordering observed in sequence space.
69 QuicPacketSequenceNumber max_sequence_reordering;
70 // Maximum reordering observed in microseconds
71 int64 max_time_reordering_us;
73 // The following stats are used only in TcpCubicSender.
74 // The number of loss events from TCP's perspective. Each loss event includes
75 // one or more lost packets.
76 uint32 tcp_loss_events;
78 // Creation time, as reported by the QuicClock.
79 QuicTime connection_creation_time;
82 } // namespace net
84 #endif // NET_QUIC_QUIC_CONNECTION_STATS_H_