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 #include "net/quic/quic_connection_stats.h"
11 QuicConnectionStats::QuicConnectionStats()
17 stream_bytes_received(0),
18 bytes_retransmitted(0),
19 packets_retransmitted(0),
20 packets_spuriously_retransmitted(0),
24 crypto_retransmit_count(0),
25 loss_timeout_count(0),
29 estimated_bandwidth(0),
30 cwnd_increase_congestion_avoidance(0),
31 cwnd_increase_cubic_mode(0) {
34 QuicConnectionStats::~QuicConnectionStats() {}
36 ostream& operator<<(ostream& os, const QuicConnectionStats& s) {
37 os << "{ bytes sent: " << s.bytes_sent
38 << ", packets sent:" << s.packets_sent
39 << ", stream bytes sent: " << s.stream_bytes_sent
40 << ", bytes received: " << s.bytes_received
41 << ", packets received: " << s.packets_received
42 << ", stream bytes received: " << s.stream_bytes_received
43 << ", bytes retransmitted: " << s.bytes_retransmitted
44 << ", packets retransmitted: " << s.packets_retransmitted
45 << ", packets_spuriously_retransmitted: "
46 << s.packets_spuriously_retransmitted
47 << ", packets lost: " << s.packets_lost
48 << ", packets revived: " << s.packets_revived
49 << ", packets dropped:" << s.packets_dropped
50 << ", crypto retransmit count: " << s.crypto_retransmit_count
51 << ", rto count: " << s.rto_count
52 << ", tlp count: " << s.tlp_count
53 << ", rtt(us): " << s.rtt
54 << ", estimated_bandwidth: " << s.estimated_bandwidth
55 << ", total amount of cwnd increase in TCPCubic, in congestion avoidance: "
56 << s.cwnd_increase_congestion_avoidance
57 << ", amount of cwnd increase in TCPCubic, in cubic mode: "
58 << s.cwnd_increase_cubic_mode