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