Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(305)

Side by Side Diff: net/quic/quic_connection_logger.cc

Issue 1775233002: Add histogram to log whether a QuicGoAwayFrame is received for connection migration. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | tools/metrics/histograms/histograms.xml » ('J')

Powered by Google App Engine
This is Rietveld 408576698