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()
19 stream_bytes_received(0),
20 bytes_retransmitted(0),
21 packets_retransmitted(0),
22 bytes_spuriously_retransmitted(0),
23 packets_spuriously_retransmitted(0),
25 slowstart_packets_lost(0),
28 crypto_retransmit_count(0),
29 loss_timeout_count(0),
35 estimated_bandwidth(QuicBandwidth::Zero()),
37 max_sequence_reordering(0),
38 max_time_reordering_us(0),
40 connection_creation_time(QuicTime::Zero()) {
43 QuicConnectionStats::~QuicConnectionStats() {}
45 ostream
& operator<<(ostream
& os
, const QuicConnectionStats
& s
) {
46 os
<< "{ bytes sent: " << s
.bytes_sent
47 << ", packets sent:" << s
.packets_sent
48 << ", stream bytes sent: " << s
.stream_bytes_sent
49 << ", packets discarded: " << s
.packets_discarded
50 << ", bytes received: " << s
.bytes_received
51 << ", packets received: " << s
.packets_received
52 << ", packets processed: " << s
.packets_processed
53 << ", stream bytes received: " << s
.stream_bytes_received
54 << ", bytes retransmitted: " << s
.bytes_retransmitted
55 << ", packets retransmitted: " << s
.packets_retransmitted
56 << ", bytes spuriously retransmitted: " << s
.bytes_spuriously_retransmitted
57 << ", packets spuriously retransmitted: "
58 << s
.packets_spuriously_retransmitted
59 << ", packets lost: " << s
.packets_lost
60 << ", slowstart packets lost: " << s
.slowstart_packets_lost
61 << ", packets revived: " << s
.packets_revived
62 << ", packets dropped:" << s
.packets_dropped
63 << ", crypto retransmit count: " << s
.crypto_retransmit_count
64 << ", tlp count: " << s
.tlp_count
65 << ", rto count: " << s
.rto_count
66 << ", min_rtt(us): " << s
.min_rtt_us
67 << ", srtt(us): " << s
.srtt_us
68 << ", max packet size: " << s
.max_packet_size
69 << ", estimated bandwidth: " << s
.estimated_bandwidth
.ToBytesPerSecond()
70 << ", tcp_loss_events: " << s
.tcp_loss_events
71 << ", packets reordered: " << s
.packets_reordered
72 << ", max sequence reordering: " << s
.max_sequence_reordering
73 << ", max time reordering(us): " << s
.max_time_reordering_us