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

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

Issue 1228873008: Introduce UMA metrics for path MTU discovery. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2454
Patch Set: 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') | no next file with comments »
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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 wait_for_data_end_time - wait_for_data_start_time; 300 wait_for_data_end_time - wait_for_data_start_time;
301 const base::HistogramBase::Sample kMaxWaitToRtt = 1000; 301 const base::HistogramBase::Sample kMaxWaitToRtt = 1000;
302 base::HistogramBase::Sample wait_to_rtt = 302 base::HistogramBase::Sample wait_to_rtt =
303 static_cast<base::HistogramBase::Sample>( 303 static_cast<base::HistogramBase::Sample>(
304 100 * wait_time.InMicroseconds() / stats.min_rtt_us); 304 100 * wait_time.InMicroseconds() / stats.min_rtt_us);
305 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicServerInfo.WaitForDataReadyToRtt", 305 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicServerInfo.WaitForDataReadyToRtt",
306 wait_to_rtt, 0, kMaxWaitToRtt, 50); 306 wait_to_rtt, 0, kMaxWaitToRtt, 50);
307 } 307 }
308 } 308 }
309 309
310 // The MTU used by QUIC is limited to a fairly small set of predefined values
311 // (initial values and MTU discovery values), but does not fare well when
312 // bucketed. Because of that, a sparse histogram is used here.
313 UMA_HISTOGRAM_SPARSE_SLOWLY("Net.QuicSession.ClientSideMtu",
314 connection()->max_packet_length());
315 UMA_HISTOGRAM_SPARSE_SLOWLY("Net.QuicSession.ServerSideMtu",
316 stats.max_received_packet_size);
317
318 UMA_HISTOGRAM_COUNTS("Net.QuicSession.MtuProbesSent",
319 connection()->mtu_probe_count());
320
310 if (stats.max_sequence_reordering == 0) 321 if (stats.max_sequence_reordering == 0)
311 return; 322 return;
312 const base::HistogramBase::Sample kMaxReordering = 100; 323 const base::HistogramBase::Sample kMaxReordering = 100;
313 base::HistogramBase::Sample reordering = kMaxReordering; 324 base::HistogramBase::Sample reordering = kMaxReordering;
314 if (stats.min_rtt_us > 0) { 325 if (stats.min_rtt_us > 0) {
315 reordering = static_cast<base::HistogramBase::Sample>( 326 reordering = static_cast<base::HistogramBase::Sample>(
316 100 * stats.max_time_reordering_us / stats.min_rtt_us); 327 100 * stats.max_time_reordering_us / stats.min_rtt_us);
317 } 328 }
318 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicSession.MaxReorderingTime", 329 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicSession.MaxReorderingTime",
319 reordering, 0, kMaxReordering, 50); 330 reordering, 0, kMaxReordering, 50);
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
934 return; 945 return;
935 946
936 // TODO(rch): re-enable this code once beta is cut. 947 // TODO(rch): re-enable this code once beta is cut.
937 // if (stream_factory_) 948 // if (stream_factory_)
938 // stream_factory_->OnSessionConnectTimeout(this); 949 // stream_factory_->OnSessionConnectTimeout(this);
939 // CloseAllStreams(ERR_QUIC_HANDSHAKE_FAILED); 950 // CloseAllStreams(ERR_QUIC_HANDSHAKE_FAILED);
940 // DCHECK_EQ(0u, GetNumOpenStreams()); 951 // DCHECK_EQ(0u, GetNumOpenStreams());
941 } 952 }
942 953
943 } // namespace net 954 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/quic/quic_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698