summaryrefslogtreecommitdiffstats
path: root/net/quic/quic_connection_stats.cc
blob: 284ecceb71aadf22696255bf8b5142bcd658a9dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "net/quic/quic_connection_stats.h"

using std::ostream;

namespace net {

QuicConnectionStats::QuicConnectionStats()
    : bytes_sent(0),
      packets_sent(0),
      stream_bytes_sent(0),
      bytes_received(0),
      packets_received(0),
      stream_bytes_received(0),
      bytes_retransmitted(0),
      packets_retransmitted(0),
      packets_spuriously_retransmitted(0),
      packets_lost(0),
      packets_revived(0),
      packets_dropped(0),
      crypto_retransmit_count(0),
      loss_timeout_count(0),
      tlp_count(0),
      rto_count(0),
      rtt(0),
      estimated_bandwidth(0),
      cwnd_increase_congestion_avoidance(0),
      cwnd_increase_cubic_mode(0) {
}

QuicConnectionStats::~QuicConnectionStats() {}

ostream& operator<<(ostream& os, const QuicConnectionStats& s) {
  os << "{ bytes sent: " << s.bytes_sent
     << ", packets sent:" << s.packets_sent
     << ", stream bytes sent: " << s.stream_bytes_sent
     << ", bytes received: " << s.bytes_received
     << ", packets received: " << s.packets_received
     << ", stream bytes received: " << s.stream_bytes_received
     << ", bytes retransmitted: " << s.bytes_retransmitted
     << ", packets retransmitted: " << s.packets_retransmitted
     << ", packets_spuriously_retransmitted: "
     << s.packets_spuriously_retransmitted
     << ", packets lost: " << s.packets_lost
     << ", packets revived: " << s.packets_revived
     << ", packets dropped:" << s.packets_dropped
     << ", crypto retransmit count: " << s.crypto_retransmit_count
     << ", rto count: " << s.rto_count
     << ", tlp count: " << s.tlp_count
     << ", rtt(us): " << s.rtt
     << ", estimated_bandwidth: " << s.estimated_bandwidth
     << ", total amount of cwnd increase in TCPCubic, in congestion avoidance: "
     << s.cwnd_increase_congestion_avoidance
     << ", amount of cwnd increase in TCPCubic, in cubic mode: "
     << s.cwnd_increase_cubic_mode
     << "}\n";
  return os;
}

}  // namespace net