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

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

Issue 1226083005: Introduce UMA metrics for path MTU discovery. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a comment explaining the choice of the histogram. Created 5 years, 5 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
« no previous file with comments | « no previous file | net/quic/quic_connection.h » ('j') | tools/metrics/histograms/histograms.xml » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/location.h" 8 #include "base/location.h"
9 #include "base/metrics/histogram_macros.h" 9 #include "base/metrics/histogram_macros.h"
10 #include "base/metrics/sparse_histogram.h" 10 #include "base/metrics/sparse_histogram.h"
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 wait_for_data_end_time - wait_for_data_start_time; 299 wait_for_data_end_time - wait_for_data_start_time;
300 const base::HistogramBase::Sample kMaxWaitToRtt = 1000; 300 const base::HistogramBase::Sample kMaxWaitToRtt = 1000;
301 base::HistogramBase::Sample wait_to_rtt = 301 base::HistogramBase::Sample wait_to_rtt =
302 static_cast<base::HistogramBase::Sample>( 302 static_cast<base::HistogramBase::Sample>(
303 100 * wait_time.InMicroseconds() / stats.min_rtt_us); 303 100 * wait_time.InMicroseconds() / stats.min_rtt_us);
304 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicServerInfo.WaitForDataReadyToRtt", 304 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicServerInfo.WaitForDataReadyToRtt",
305 wait_to_rtt, 0, kMaxWaitToRtt, 50); 305 wait_to_rtt, 0, kMaxWaitToRtt, 50);
306 } 306 }
307 } 307 }
308 308
309 // The MTU used by QUIC is limited to a fairly small set of predefined values
310 // (initial values and MTU discovery values), but does not fare well when
311 // bucketed. Because of that, a sparse histogram is used here.
312 UMA_HISTOGRAM_SPARSE_SLOWLY("Net.QuicSession.ClientSideMtu",
313 connection()->max_packet_length());
314 UMA_HISTOGRAM_SPARSE_SLOWLY("Net.QuicSession.ServerSideMtu",
315 stats.max_received_packet_size);
316
317 UMA_HISTOGRAM_COUNTS("Net.QuicSession.MtuProbesSent",
318 connection()->mtu_probe_count());
319
309 if (stats.max_sequence_reordering == 0) 320 if (stats.max_sequence_reordering == 0)
310 return; 321 return;
311 const base::HistogramBase::Sample kMaxReordering = 100; 322 const base::HistogramBase::Sample kMaxReordering = 100;
312 base::HistogramBase::Sample reordering = kMaxReordering; 323 base::HistogramBase::Sample reordering = kMaxReordering;
313 if (stats.min_rtt_us > 0) { 324 if (stats.min_rtt_us > 0) {
314 reordering = static_cast<base::HistogramBase::Sample>( 325 reordering = static_cast<base::HistogramBase::Sample>(
315 100 * stats.max_time_reordering_us / stats.min_rtt_us); 326 100 * stats.max_time_reordering_us / stats.min_rtt_us);
316 } 327 }
317 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicSession.MaxReorderingTime", 328 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicSession.MaxReorderingTime",
318 reordering, 0, kMaxReordering, 50); 329 reordering, 0, kMaxReordering, 50);
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
930 return; 941 return;
931 942
932 // TODO(rch): re-enable this code once beta is cut. 943 // TODO(rch): re-enable this code once beta is cut.
933 // if (stream_factory_) 944 // if (stream_factory_)
934 // stream_factory_->OnSessionConnectTimeout(this); 945 // stream_factory_->OnSessionConnectTimeout(this);
935 // CloseAllStreams(ERR_QUIC_HANDSHAKE_FAILED); 946 // CloseAllStreams(ERR_QUIC_HANDSHAKE_FAILED);
936 // DCHECK_EQ(0u, GetNumOpenStreams()); 947 // DCHECK_EQ(0u, GetNumOpenStreams());
937 } 948 }
938 949
939 } // namespace net 950 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/quic/quic_connection.h » ('j') | tools/metrics/histograms/histograms.xml » ('J')

Powered by Google App Engine
This is Rietveld 408576698