1 // Copyright (c) 2012 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_STATS_H_ 6 #define NET_QUIC_QUIC_STATS_H_ 7 8 #include "base/basictypes.h" 9 #include "net/base/net_export.h" 10 11 namespace net { 12 // TODO(satyamshekhar): Add more interesting stats: 13 // 1. (C/S)HLO retransmission count. 14 // 2. SHLO received to first stream packet processed time. 15 // 3. CHLO sent to SHLO received time. 16 // 4. Number of migrations. 17 // 5. Number of out of order packets. 18 // 6. Avg packet size. 19 // 7. Number of connections that require more that 1-RTT. 20 // 8. Avg number of streams / session. 21 // 9. Number of duplicates received. 22 // 10. Fraction of traffic sent/received that was not data (protocol overhead). 23 // 11. Fraction of data transferred that was padding. 24 25 // Structure to hold stats for a QuicConnection. 26 struct NET_EXPORT_PRIVATE QuicConnectionStats { 27 QuicConnectionStats(); 28 ~QuicConnectionStats(); 29 30 uint64 bytes_sent; // includes retransmissions, fec. 31 uint32 packets_sent; 32 33 uint64 bytes_received; // includes duplicate data for a stream, fec. 34 uint32 packets_received; // includes dropped packets 35 36 uint64 bytes_retransmitted; 37 uint32 packets_retransmitted; 38 39 uint32 packets_revived; 40 uint32 packets_dropped; // duplicate or less than least unacked. 41 uint32 rto_count; 42 43 uint32 rtt; 44 uint64 estimated_bandwidth; 45 // TODO(satyamshekhar): Add window_size, mss and mtu. 46 }; 47 48 } // namespace net 49 50 #endif // NET_QUIC_QUIC_STATS_H_ 51