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 | |
QUICHE team | 5be974e | 2020-12-29 18:35:24 -0500 | [diff] [blame] | 5 | #include "quic/core/quic_connection_stats.h" |
QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 6 | |
| 7 | namespace quic { |
| 8 | |
QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 9 | std::ostream& operator<<(std::ostream& os, const QuicConnectionStats& s) { |
| 10 | os << "{ bytes_sent: " << s.bytes_sent; |
| 11 | os << " packets_sent: " << s.packets_sent; |
| 12 | os << " stream_bytes_sent: " << s.stream_bytes_sent; |
| 13 | os << " packets_discarded: " << s.packets_discarded; |
| 14 | os << " bytes_received: " << s.bytes_received; |
| 15 | os << " packets_received: " << s.packets_received; |
| 16 | os << " packets_processed: " << s.packets_processed; |
| 17 | os << " stream_bytes_received: " << s.stream_bytes_received; |
| 18 | os << " bytes_retransmitted: " << s.bytes_retransmitted; |
| 19 | os << " packets_retransmitted: " << s.packets_retransmitted; |
| 20 | os << " bytes_spuriously_retransmitted: " << s.bytes_spuriously_retransmitted; |
| 21 | os << " packets_spuriously_retransmitted: " |
| 22 | << s.packets_spuriously_retransmitted; |
| 23 | os << " packets_lost: " << s.packets_lost; |
| 24 | os << " slowstart_packets_sent: " << s.slowstart_packets_sent; |
| 25 | os << " slowstart_packets_lost: " << s.slowstart_packets_lost; |
| 26 | os << " slowstart_bytes_lost: " << s.slowstart_bytes_lost; |
| 27 | os << " packets_dropped: " << s.packets_dropped; |
dschinazi | 7d0f3c8 | 2019-09-16 16:14:32 -0700 | [diff] [blame] | 28 | os << " undecryptable_packets_received_before_handshake_complete: " |
| 29 | << s.undecryptable_packets_received_before_handshake_complete; |
QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 30 | os << " crypto_retransmit_count: " << s.crypto_retransmit_count; |
| 31 | os << " loss_timeout_count: " << s.loss_timeout_count; |
| 32 | os << " tlp_count: " << s.tlp_count; |
| 33 | os << " rto_count: " << s.rto_count; |
fayang | ce0a316 | 2019-08-15 09:05:36 -0700 | [diff] [blame] | 34 | os << " pto_count: " << s.pto_count; |
QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 35 | os << " min_rtt_us: " << s.min_rtt_us; |
| 36 | os << " srtt_us: " << s.srtt_us; |
wub | 9e97f80 | 2021-05-19 08:54:35 -0700 | [diff] [blame] | 37 | os << " egress_mtu: " << s.egress_mtu; |
wub | 3127a54 | 2021-05-19 14:48:23 -0700 | [diff] [blame] | 38 | os << " max_egress_mtu: " << s.max_egress_mtu; |
wub | 9e97f80 | 2021-05-19 08:54:35 -0700 | [diff] [blame] | 39 | os << " ingress_mtu: " << s.ingress_mtu; |
QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 40 | os << " estimated_bandwidth: " << s.estimated_bandwidth; |
| 41 | os << " packets_reordered: " << s.packets_reordered; |
| 42 | os << " max_sequence_reordering: " << s.max_sequence_reordering; |
| 43 | os << " max_time_reordering_us: " << s.max_time_reordering_us; |
| 44 | os << " tcp_loss_events: " << s.tcp_loss_events; |
| 45 | os << " connection_creation_time: " |
| 46 | << s.connection_creation_time.ToDebuggingValue(); |
| 47 | os << " blocked_frames_received: " << s.blocked_frames_received; |
| 48 | os << " blocked_frames_sent: " << s.blocked_frames_sent; |
| 49 | os << " num_connectivity_probing_received: " |
dschinazi | 8a030dd | 2019-10-14 13:17:18 -0700 | [diff] [blame] | 50 | << s.num_connectivity_probing_received; |
| 51 | os << " retry_packet_processed: " |
| 52 | << (s.retry_packet_processed ? "yes" : "no"); |
fayang | 58f7107 | 2019-11-05 08:47:02 -0800 | [diff] [blame] | 53 | os << " num_coalesced_packets_received: " << s.num_coalesced_packets_received; |
| 54 | os << " num_coalesced_packets_processed: " |
| 55 | << s.num_coalesced_packets_processed; |
wub | 5cd4959 | 2019-11-25 15:17:13 -0800 | [diff] [blame] | 56 | os << " num_ack_aggregation_epochs: " << s.num_ack_aggregation_epochs; |
dschinazi | 6458eb3 | 2020-06-23 12:38:41 -0700 | [diff] [blame] | 57 | os << " sent_legacy_version_encapsulated_packets: " |
| 58 | << s.sent_legacy_version_encapsulated_packets; |
mattm | 072a7e3 | 2020-10-09 16:16:56 -0700 | [diff] [blame] | 59 | os << " key_update_count: " << s.key_update_count; |
mattm | a2ae935 | 2020-10-23 15:55:14 -0700 | [diff] [blame] | 60 | os << " num_failed_authentication_packets_received: " |
| 61 | << s.num_failed_authentication_packets_received; |
mattm | ad5eb5d | 2020-12-03 16:12:15 -0800 | [diff] [blame] | 62 | os << " num_tls_server_zero_rtt_packets_received_after_discarding_decrypter: " |
| 63 | << s.num_tls_server_zero_rtt_packets_received_after_discarding_decrypter; |
fayang | 133b868 | 2020-12-08 05:50:33 -0800 | [diff] [blame] | 64 | os << " address_validated_via_decrypting_packet: " |
| 65 | << s.address_validated_via_decrypting_packet; |
| 66 | os << " address_validated_via_token: " << s.address_validated_via_token; |
dschinazi | 8a030dd | 2019-10-14 13:17:18 -0700 | [diff] [blame] | 67 | os << " }"; |
QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 68 | |
| 69 | return os; |
| 70 | } |
| 71 | |
| 72 | } // namespace quic |