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 |
(...skipping 11 matching lines...) Expand all Loading... |
22 bytes_spuriously_retransmitted(0), | 22 bytes_spuriously_retransmitted(0), |
23 packets_spuriously_retransmitted(0), | 23 packets_spuriously_retransmitted(0), |
24 packets_lost(0), | 24 packets_lost(0), |
25 slowstart_packets_lost(0), | 25 slowstart_packets_lost(0), |
26 packets_revived(0), | 26 packets_revived(0), |
27 packets_dropped(0), | 27 packets_dropped(0), |
28 crypto_retransmit_count(0), | 28 crypto_retransmit_count(0), |
29 loss_timeout_count(0), | 29 loss_timeout_count(0), |
30 tlp_count(0), | 30 tlp_count(0), |
31 rto_count(0), | 31 rto_count(0), |
32 spurious_rto_count(0), | |
33 min_rtt_us(0), | 32 min_rtt_us(0), |
34 srtt_us(0), | 33 srtt_us(0), |
35 max_packet_size(0), | 34 max_packet_size(0), |
36 estimated_bandwidth(QuicBandwidth::Zero()), | 35 estimated_bandwidth(QuicBandwidth::Zero()), |
37 packets_reordered(0), | 36 packets_reordered(0), |
38 max_sequence_reordering(0), | 37 max_sequence_reordering(0), |
39 max_time_reordering_us(0), | 38 max_time_reordering_us(0), |
40 tcp_loss_events(0), | 39 tcp_loss_events(0), |
41 cwnd_increase_congestion_avoidance(0), | |
42 cwnd_increase_cubic_mode(0), | |
43 connection_creation_time(QuicTime::Zero()) { | 40 connection_creation_time(QuicTime::Zero()) { |
44 } | 41 } |
45 | 42 |
46 QuicConnectionStats::~QuicConnectionStats() {} | 43 QuicConnectionStats::~QuicConnectionStats() {} |
47 | 44 |
48 ostream& operator<<(ostream& os, const QuicConnectionStats& s) { | 45 ostream& operator<<(ostream& os, const QuicConnectionStats& s) { |
49 os << "{ bytes sent: " << s.bytes_sent | 46 os << "{ bytes sent: " << s.bytes_sent |
50 << ", packets sent:" << s.packets_sent | 47 << ", packets sent:" << s.packets_sent |
51 << ", stream bytes sent: " << s.stream_bytes_sent | 48 << ", stream bytes sent: " << s.stream_bytes_sent |
52 << ", packets discarded: " << s.packets_discarded | 49 << ", packets discarded: " << s.packets_discarded |
53 << ", bytes received: " << s.bytes_received | 50 << ", bytes received: " << s.bytes_received |
54 << ", packets received: " << s.packets_received | 51 << ", packets received: " << s.packets_received |
55 << ", packets processed: " << s.packets_processed | 52 << ", packets processed: " << s.packets_processed |
56 << ", stream bytes received: " << s.stream_bytes_received | 53 << ", stream bytes received: " << s.stream_bytes_received |
57 << ", bytes retransmitted: " << s.bytes_retransmitted | 54 << ", bytes retransmitted: " << s.bytes_retransmitted |
58 << ", packets retransmitted: " << s.packets_retransmitted | 55 << ", packets retransmitted: " << s.packets_retransmitted |
59 << ", bytes spuriously retransmitted: " << s.bytes_spuriously_retransmitted | 56 << ", bytes spuriously retransmitted: " << s.bytes_spuriously_retransmitted |
60 << ", packets spuriously retransmitted: " | 57 << ", packets spuriously retransmitted: " |
61 << s.packets_spuriously_retransmitted | 58 << s.packets_spuriously_retransmitted |
62 << ", packets lost: " << s.packets_lost | 59 << ", packets lost: " << s.packets_lost |
63 << ", slowstart packets lost: " << s.slowstart_packets_lost | 60 << ", slowstart packets lost: " << s.slowstart_packets_lost |
64 << ", packets revived: " << s.packets_revived | 61 << ", packets revived: " << s.packets_revived |
65 << ", packets dropped:" << s.packets_dropped | 62 << ", packets dropped:" << s.packets_dropped |
66 << ", crypto retransmit count: " << s.crypto_retransmit_count | 63 << ", crypto retransmit count: " << s.crypto_retransmit_count |
67 << ", tlp count: " << s.tlp_count | 64 << ", tlp count: " << s.tlp_count |
68 << ", rto count: " << s.rto_count | 65 << ", rto count: " << s.rto_count |
69 << ", spurious_rto_count:" << s.spurious_rto_count | |
70 << ", min_rtt(us): " << s.min_rtt_us | 66 << ", min_rtt(us): " << s.min_rtt_us |
71 << ", srtt(us): " << s.srtt_us | 67 << ", srtt(us): " << s.srtt_us |
72 << ", max packet size: " << s.max_packet_size | 68 << ", max packet size: " << s.max_packet_size |
73 << ", estimated bandwidth: " << s.estimated_bandwidth.ToBytesPerSecond() | 69 << ", estimated bandwidth: " << s.estimated_bandwidth.ToBytesPerSecond() |
74 << ", tcp_loss_events: " << s.tcp_loss_events | 70 << ", tcp_loss_events: " << s.tcp_loss_events |
75 << ", packets reordered: " << s.packets_reordered | 71 << ", packets reordered: " << s.packets_reordered |
76 << ", max sequence reordering: " << s.max_sequence_reordering | 72 << ", max sequence reordering: " << s.max_sequence_reordering |
77 << ", max time reordering(us): " << s.max_time_reordering_us | 73 << ", max time reordering(us): " << s.max_time_reordering_us |
78 << ", total amount of cwnd increase in TCPCubic, in congestion avoidance: " | |
79 << s.cwnd_increase_congestion_avoidance | |
80 << ", amount of cwnd increase in TCPCubic, in cubic mode: " | |
81 << s.cwnd_increase_cubic_mode | |
82 << "}\n"; | 74 << "}\n"; |
83 return os; | 75 return os; |
84 } | 76 } |
85 | 77 |
86 } // namespace net | 78 } // namespace net |
OLD | NEW |