Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_logger.h" | 5 #include "net/quic/quic_connection_logger.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 606 base::Bind(&NetLogQuicWindowUpdateFrameCallback, &frame)); | 606 base::Bind(&NetLogQuicWindowUpdateFrameCallback, &frame)); |
| 607 } | 607 } |
| 608 | 608 |
| 609 void QuicConnectionLogger::OnBlockedFrame(const QuicBlockedFrame& frame) { | 609 void QuicConnectionLogger::OnBlockedFrame(const QuicBlockedFrame& frame) { |
| 610 ++num_blocked_frames_received_; | 610 ++num_blocked_frames_received_; |
| 611 net_log_.AddEvent(NetLog::TYPE_QUIC_SESSION_BLOCKED_FRAME_RECEIVED, | 611 net_log_.AddEvent(NetLog::TYPE_QUIC_SESSION_BLOCKED_FRAME_RECEIVED, |
| 612 base::Bind(&NetLogQuicBlockedFrameCallback, &frame)); | 612 base::Bind(&NetLogQuicBlockedFrameCallback, &frame)); |
| 613 } | 613 } |
| 614 | 614 |
| 615 void QuicConnectionLogger::OnGoAwayFrame(const QuicGoAwayFrame& frame) { | 615 void QuicConnectionLogger::OnGoAwayFrame(const QuicGoAwayFrame& frame) { |
| 616 UMA_HISTOGRAM_BOOLEAN("Net.QuicSession.GoAwayReceivedForConnectionMigration", | |
| 617 frame.reason_phrase == "peer connection migration"); | |
|
Alexei Svitkine (slow)
2016/03/09 18:58:20
Can "peer connection migration" be a constant defi
Ryan Hamilton
2016/03/09 19:06:14
Good idea.
Zhongyi Shi
2016/03/10 00:42:22
Done.
| |
| 618 | |
| 616 net_log_.AddEvent(NetLog::TYPE_QUIC_SESSION_GOAWAY_FRAME_RECEIVED, | 619 net_log_.AddEvent(NetLog::TYPE_QUIC_SESSION_GOAWAY_FRAME_RECEIVED, |
| 617 base::Bind(&NetLogQuicGoAwayFrameCallback, &frame)); | 620 base::Bind(&NetLogQuicGoAwayFrameCallback, &frame)); |
| 618 } | 621 } |
| 619 | 622 |
| 620 void QuicConnectionLogger::OnPingFrame(const QuicPingFrame& frame) { | 623 void QuicConnectionLogger::OnPingFrame(const QuicPingFrame& frame) { |
| 621 // PingFrame has no contents to log, so just record that it was received. | 624 // PingFrame has no contents to log, so just record that it was received. |
| 622 net_log_.AddEvent(NetLog::TYPE_QUIC_SESSION_PING_FRAME_RECEIVED); | 625 net_log_.AddEvent(NetLog::TYPE_QUIC_SESSION_PING_FRAME_RECEIVED); |
| 623 } | 626 } |
| 624 | 627 |
| 625 void QuicConnectionLogger::OnPublicResetPacket( | 628 void QuicConnectionLogger::OnPublicResetPacket( |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 871 continue; | 874 continue; |
| 872 } | 875 } |
| 873 // Record some overlapping patterns, to get a better picture, since this is | 876 // Record some overlapping patterns, to get a better picture, since this is |
| 874 // not very expensive. | 877 // not very expensive. |
| 875 if (i % 3 == 0) | 878 if (i % 3 == 0) |
| 876 six_packet_histogram->Add(recent_6_mask); | 879 six_packet_histogram->Add(recent_6_mask); |
| 877 } | 880 } |
| 878 } | 881 } |
| 879 | 882 |
| 880 } // namespace net | 883 } // namespace net |
| OLD | NEW |