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

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

Issue 298893010: Add three new histogram to tracking QUIC packet reordering: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix comments Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_client_session.h" 5 #include "net/quic/quic_client_session.h"
6 6
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/metrics/sparse_histogram.h" 10 #include "base/metrics/sparse_histogram.h"
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 } 236 }
237 } else { 237 } else {
238 if (port_selected) { 238 if (port_selected) {
239 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicSession.ConnectSelectPortForHTTPS", 239 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicSession.ConnectSelectPortForHTTPS",
240 round_trip_handshakes, 0, 3, 4); 240 round_trip_handshakes, 0, 3, 4);
241 } else { 241 } else {
242 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicSession.ConnectRandomPortForHTTPS", 242 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicSession.ConnectRandomPortForHTTPS",
243 round_trip_handshakes, 0, 3, 4); 243 round_trip_handshakes, 0, 3, 4);
244 } 244 }
245 } 245 }
246 const QuicConnectionStats stats = connection()->GetStats();
247 uint64 reordering =
248 GG_UINT64_C(100) * stats.max_time_reordering_us / stats.min_rtt_us;
249 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicSession.MaxReorderingTime",
250 reordering, 0, 100, 101);
251 if (stats.min_rtt_us > 100) {
252 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicSession.MaxReorderingTimeLongRtt",
253 reordering, 0, 100, 101);
254 }
255 UMA_HISTOGRAM_COUNTS("Net.QuicSession.MaxReordering",
256 stats.max_sequence_reordering);
246 } 257 }
247 258
248 void QuicClientSession::OnStreamFrames( 259 void QuicClientSession::OnStreamFrames(
249 const std::vector<QuicStreamFrame>& frames) { 260 const std::vector<QuicStreamFrame>& frames) {
250 // Record total number of stream frames. 261 // Record total number of stream frames.
251 UMA_HISTOGRAM_COUNTS("Net.QuicNumStreamFramesInPacket", frames.size()); 262 UMA_HISTOGRAM_COUNTS("Net.QuicNumStreamFramesInPacket", frames.size());
252 263
253 // Record number of frames per stream in packet. 264 // Record number of frames per stream in packet.
254 typedef std::map<QuicStreamId, size_t> FrameCounter; 265 typedef std::map<QuicStreamId, size_t> FrameCounter;
255 FrameCounter frames_per_stream; 266 FrameCounter frames_per_stream;
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 RecordUnexpectedNotGoingAway(NOTIFY_FACTORY_OF_SESSION_CLOSED); 788 RecordUnexpectedNotGoingAway(NOTIFY_FACTORY_OF_SESSION_CLOSED);
778 789
779 going_away_ = true; 790 going_away_ = true;
780 DCHECK_EQ(0u, GetNumOpenStreams()); 791 DCHECK_EQ(0u, GetNumOpenStreams());
781 // Will delete |this|. 792 // Will delete |this|.
782 if (stream_factory_) 793 if (stream_factory_)
783 stream_factory_->OnSessionClosed(this); 794 stream_factory_->OnSessionClosed(this);
784 } 795 }
785 796
786 } // namespace net 797 } // 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