- add sources.
[platform/framework/web/crosswalk.git] / src / net / quic / quic_connection_stats.cc
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/quic/quic_connection_stats.h"
6
7 using std::ostream;
8
9 namespace net {
10
11 QuicConnectionStats::QuicConnectionStats()
12     : bytes_sent(0),
13       packets_sent(0),
14       stream_bytes_sent(0),
15       bytes_received(0),
16       packets_received(0),
17       stream_bytes_received(0),
18       bytes_retransmitted(0),
19       packets_retransmitted(0),
20       packets_revived(0),
21       packets_dropped(0),
22       rto_count(0),
23       rtt(0),
24       estimated_bandwidth(0) {
25 }
26
27 QuicConnectionStats::~QuicConnectionStats() {}
28
29 ostream& operator<<(ostream& os, const QuicConnectionStats& s) {
30   os << "{ bytes sent: " << s.bytes_sent
31      << ", packets sent:" << s.packets_sent
32      << ", stream bytes sent: " << s.stream_bytes_sent
33      << ", bytes received: " << s.bytes_received
34      << ", packets received: " << s.packets_received
35      << ", stream bytes received: " << s.stream_bytes_received
36      << ", bytes retransmitted: " << s.bytes_retransmitted
37      << ", packets retransmitted: " << s.packets_retransmitted
38      << ", packets revived: " << s.packets_revived
39      << ", packets dropped:" << s.packets_dropped
40      << ", rto count: " << s.rto_count
41      << ", rtt(us): " << s.rtt
42      << ", estimated_bandwidth: " << s.estimated_bandwidth
43      << "}\n";
44   return os;
45 }
46
47 }  // namespace net