OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "net/quic/quic_connection_stats.h" | 5 #include "net/quic/quic_connection_stats.h" |
6 | 6 |
7 using std::ostream; | 7 using std::ostream; |
8 | 8 |
9 namespace net { | 9 namespace net { |
10 | 10 |
11 QuicConnectionStats::QuicConnectionStats() | 11 QuicConnectionStats::QuicConnectionStats() |
12 : bytes_sent(0), | 12 : bytes_sent(0), |
13 packets_sent(0), | 13 packets_sent(0), |
14 stream_bytes_sent(0), | 14 stream_bytes_sent(0), |
15 bytes_received(0), | 15 bytes_received(0), |
16 packets_received(0), | 16 packets_received(0), |
17 stream_bytes_received(0), | 17 stream_bytes_received(0), |
18 bytes_retransmitted(0), | 18 bytes_retransmitted(0), |
19 packets_retransmitted(0), | 19 packets_retransmitted(0), |
20 packets_spuriously_retransmitted(0), | 20 packets_spuriously_retransmitted(0), |
21 packets_lost(0), | 21 packets_lost(0), |
22 packets_revived(0), | 22 packets_revived(0), |
23 packets_dropped(0), | 23 packets_dropped(0), |
24 crypto_retransmit_count(0), | 24 crypto_retransmit_count(0), |
| 25 loss_timeout_count(0), |
25 tlp_count(0), | 26 tlp_count(0), |
26 rto_count(0), | 27 rto_count(0), |
27 rtt(0), | 28 rtt(0), |
28 estimated_bandwidth(0) { | 29 estimated_bandwidth(0), |
| 30 cwnd_increase_cubic_mode(0), |
| 31 cwnd_increase_reno_mode(0) { |
29 } | 32 } |
30 | 33 |
31 QuicConnectionStats::~QuicConnectionStats() {} | 34 QuicConnectionStats::~QuicConnectionStats() {} |
32 | 35 |
33 ostream& operator<<(ostream& os, const QuicConnectionStats& s) { | 36 ostream& operator<<(ostream& os, const QuicConnectionStats& s) { |
34 os << "{ bytes sent: " << s.bytes_sent | 37 os << "{ bytes sent: " << s.bytes_sent |
35 << ", packets sent:" << s.packets_sent | 38 << ", packets sent:" << s.packets_sent |
36 << ", stream bytes sent: " << s.stream_bytes_sent | 39 << ", stream bytes sent: " << s.stream_bytes_sent |
37 << ", bytes received: " << s.bytes_received | 40 << ", bytes received: " << s.bytes_received |
38 << ", packets received: " << s.packets_received | 41 << ", packets received: " << s.packets_received |
39 << ", stream bytes received: " << s.stream_bytes_received | 42 << ", stream bytes received: " << s.stream_bytes_received |
40 << ", bytes retransmitted: " << s.bytes_retransmitted | 43 << ", bytes retransmitted: " << s.bytes_retransmitted |
41 << ", packets retransmitted: " << s.packets_retransmitted | 44 << ", packets retransmitted: " << s.packets_retransmitted |
42 << ", packets_spuriously_retransmitted: " | 45 << ", packets_spuriously_retransmitted: " |
43 << s.packets_spuriously_retransmitted | 46 << s.packets_spuriously_retransmitted |
44 << ", packets lost: " << s.packets_lost | 47 << ", packets lost: " << s.packets_lost |
45 << ", packets revived: " << s.packets_revived | 48 << ", packets revived: " << s.packets_revived |
46 << ", packets dropped:" << s.packets_dropped | 49 << ", packets dropped:" << s.packets_dropped |
47 << ", crypto retransmit count: " << s.crypto_retransmit_count | 50 << ", crypto retransmit count: " << s.crypto_retransmit_count |
48 << ", rto count: " << s.rto_count | 51 << ", rto count: " << s.rto_count |
49 << ", tlp count: " << s.tlp_count | 52 << ", tlp count: " << s.tlp_count |
50 << ", rtt(us): " << s.rtt | 53 << ", rtt(us): " << s.rtt |
51 << ", estimated_bandwidth: " << s.estimated_bandwidth | 54 << ", estimated_bandwidth: " << s.estimated_bandwidth |
| 55 << ", amount of cwnd increase in TCPCubic, in cubic mode: " |
| 56 << s.cwnd_increase_cubic_mode |
| 57 << ", amount of cwnd increase in TCPCubic, matched by or in reno mode: " |
| 58 << s.cwnd_increase_reno_mode |
52 << "}\n"; | 59 << "}\n"; |
53 return os; | 60 return os; |
54 } | 61 } |
55 | 62 |
56 } // namespace net | 63 } // namespace net |
OLD | NEW |