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_
10 #include "base/basictypes.h"
11 #include "net/base/net_export.h"
14 // TODO(satyamshekhar): Add more interesting stats:
15 // 1. (C/S)HLO retransmission count.
16 // 2. SHLO received to first stream packet processed time.
17 // 3. CHLO sent to SHLO received time.
18 // 4. Number of migrations.
19 // 5. Number of out of order packets.
20 // 6. Number of connections that require more that 1-RTT.
21 // 7. Avg number of streams / session.
22 // 8. Number of duplicates received.
23 // 9. Fraction of data transferred that was padding.
25 // Structure to hold stats for a QuicConnection.
26 struct NET_EXPORT_PRIVATE QuicConnectionStats
{
27 QuicConnectionStats();
28 ~QuicConnectionStats();
30 NET_EXPORT_PRIVATE
friend std::ostream
& operator<<(
31 std::ostream
& os
, const QuicConnectionStats
& s
);
33 uint64 bytes_sent
; // includes retransmissions, fec.
35 uint64 stream_bytes_sent
; // non-retransmitted bytes sent in a stream frame.
37 uint64 bytes_received
; // includes duplicate data for a stream, fec.
38 uint32 packets_received
; // includes dropped packets
39 uint64 stream_bytes_received
; // bytes received in a stream frame.
41 uint64 bytes_retransmitted
;
42 uint32 packets_retransmitted
;
44 uint32 packets_spuriously_retransmitted
;
47 uint32 packets_revived
;
48 uint32 packets_dropped
; // duplicate or less than least unacked.
49 uint32 crypto_retransmit_count
;
50 uint32 loss_timeout_count
; // Count of times the loss detection alarm fired.
54 uint32 rtt
; // In microseconds
55 uint64 estimated_bandwidth
;
57 // The following stats are used only in TcpCubicSender.
58 // Total amount of cwnd increase by TCPCubic in congestion avoidance.
59 uint32 cwnd_increase_congestion_avoidance
;
60 // Total amount of cwnd increase by TCPCubic in cubic mode.
61 uint32 cwnd_increase_cubic_mode
;
62 // TODO(satyamshekhar): Add window_size, mss and mtu.
67 #endif // NET_QUIC_QUIC_CONNECTION_STATS_H_