QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 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. |
| 4 | |
| 5 | #include "net/third_party/quiche/src/quic/core/quic_connection_stats.h" |
| 6 | |
| 7 | namespace quic { |
| 8 | |
| 9 | QuicConnectionStats::QuicConnectionStats() |
| 10 | : bytes_sent(0), |
| 11 | packets_sent(0), |
| 12 | stream_bytes_sent(0), |
| 13 | packets_discarded(0), |
| 14 | bytes_received(0), |
| 15 | packets_received(0), |
| 16 | packets_processed(0), |
| 17 | stream_bytes_received(0), |
| 18 | bytes_retransmitted(0), |
| 19 | packets_retransmitted(0), |
| 20 | bytes_spuriously_retransmitted(0), |
| 21 | packets_spuriously_retransmitted(0), |
| 22 | packets_lost(0), |
| 23 | slowstart_packets_sent(0), |
| 24 | slowstart_packets_lost(0), |
| 25 | slowstart_bytes_lost(0), |
| 26 | packets_dropped(0), |
| 27 | crypto_retransmit_count(0), |
| 28 | loss_timeout_count(0), |
| 29 | tlp_count(0), |
| 30 | rto_count(0), |
| 31 | min_rtt_us(0), |
| 32 | srtt_us(0), |
| 33 | max_packet_size(0), |
| 34 | max_received_packet_size(0), |
| 35 | estimated_bandwidth(QuicBandwidth::Zero()), |
| 36 | packets_reordered(0), |
| 37 | max_sequence_reordering(0), |
| 38 | max_time_reordering_us(0), |
| 39 | tcp_loss_events(0), |
| 40 | connection_creation_time(QuicTime::Zero()), |
| 41 | blocked_frames_received(0), |
| 42 | blocked_frames_sent(0), |
| 43 | num_connectivity_probing_received(0) {} |
| 44 | |
| 45 | QuicConnectionStats::QuicConnectionStats(const QuicConnectionStats& other) = |
| 46 | default; |
| 47 | |
| 48 | QuicConnectionStats::~QuicConnectionStats() {} |
| 49 | |
| 50 | std::ostream& operator<<(std::ostream& os, const QuicConnectionStats& s) { |
| 51 | os << "{ bytes_sent: " << s.bytes_sent; |
| 52 | os << " packets_sent: " << s.packets_sent; |
| 53 | os << " stream_bytes_sent: " << s.stream_bytes_sent; |
| 54 | os << " packets_discarded: " << s.packets_discarded; |
| 55 | os << " bytes_received: " << s.bytes_received; |
| 56 | os << " packets_received: " << s.packets_received; |
| 57 | os << " packets_processed: " << s.packets_processed; |
| 58 | os << " stream_bytes_received: " << s.stream_bytes_received; |
| 59 | os << " bytes_retransmitted: " << s.bytes_retransmitted; |
| 60 | os << " packets_retransmitted: " << s.packets_retransmitted; |
| 61 | os << " bytes_spuriously_retransmitted: " << s.bytes_spuriously_retransmitted; |
| 62 | os << " packets_spuriously_retransmitted: " |
| 63 | << s.packets_spuriously_retransmitted; |
| 64 | os << " packets_lost: " << s.packets_lost; |
| 65 | os << " slowstart_packets_sent: " << s.slowstart_packets_sent; |
| 66 | os << " slowstart_packets_lost: " << s.slowstart_packets_lost; |
| 67 | os << " slowstart_bytes_lost: " << s.slowstart_bytes_lost; |
| 68 | os << " packets_dropped: " << s.packets_dropped; |
| 69 | os << " crypto_retransmit_count: " << s.crypto_retransmit_count; |
| 70 | os << " loss_timeout_count: " << s.loss_timeout_count; |
| 71 | os << " tlp_count: " << s.tlp_count; |
| 72 | os << " rto_count: " << s.rto_count; |
| 73 | os << " min_rtt_us: " << s.min_rtt_us; |
| 74 | os << " srtt_us: " << s.srtt_us; |
| 75 | os << " max_packet_size: " << s.max_packet_size; |
| 76 | os << " max_received_packet_size: " << s.max_received_packet_size; |
| 77 | os << " estimated_bandwidth: " << s.estimated_bandwidth; |
| 78 | os << " packets_reordered: " << s.packets_reordered; |
| 79 | os << " max_sequence_reordering: " << s.max_sequence_reordering; |
| 80 | os << " max_time_reordering_us: " << s.max_time_reordering_us; |
| 81 | os << " tcp_loss_events: " << s.tcp_loss_events; |
| 82 | os << " connection_creation_time: " |
| 83 | << s.connection_creation_time.ToDebuggingValue(); |
| 84 | os << " blocked_frames_received: " << s.blocked_frames_received; |
| 85 | os << " blocked_frames_sent: " << s.blocked_frames_sent; |
| 86 | os << " num_connectivity_probing_received: " |
| 87 | << s.num_connectivity_probing_received << " }"; |
| 88 | |
| 89 | return os; |
| 90 | } |
| 91 | |
| 92 | } // namespace quic |