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

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

Issue 502243002: Adding histogram to count number of RTTs for handshake when confirmation is required. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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) 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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 232
233 bool port_selected = stream_factory_->enable_port_selection(); 233 bool port_selected = stream_factory_->enable_port_selection();
234 SSLInfo ssl_info; 234 SSLInfo ssl_info;
235 if (!GetSSLInfo(&ssl_info) || !ssl_info.cert) { 235 if (!GetSSLInfo(&ssl_info) || !ssl_info.cert) {
236 if (port_selected) { 236 if (port_selected) {
237 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicSession.ConnectSelectPortForHTTP", 237 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicSession.ConnectSelectPortForHTTP",
238 round_trip_handshakes, 0, 3, 4); 238 round_trip_handshakes, 0, 3, 4);
239 } else { 239 } else {
240 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicSession.ConnectRandomPortForHTTP", 240 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicSession.ConnectRandomPortForHTTP",
241 round_trip_handshakes, 0, 3, 4); 241 round_trip_handshakes, 0, 3, 4);
242 if (require_confirmation_) {
243 UMA_HISTOGRAM_CUSTOM_COUNTS(
244 "Net.QuicSession.ConnectRandomPortRequiringConfirmationForHTTP",
245 round_trip_handshakes, 0, 3, 4);
246 }
242 } 247 }
243 } else { 248 } else {
244 if (port_selected) { 249 if (port_selected) {
245 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicSession.ConnectSelectPortForHTTPS", 250 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicSession.ConnectSelectPortForHTTPS",
246 round_trip_handshakes, 0, 3, 4); 251 round_trip_handshakes, 0, 3, 4);
247 } else { 252 } else {
248 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicSession.ConnectRandomPortForHTTPS", 253 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicSession.ConnectRandomPortForHTTPS",
249 round_trip_handshakes, 0, 3, 4); 254 round_trip_handshakes, 0, 3, 4);
255 if (require_confirmation_) {
256 UMA_HISTOGRAM_CUSTOM_COUNTS(
257 "Net.QuicSession.ConnectRandomPortRequiringConfirmationForHTTPS",
258 round_trip_handshakes, 0, 3, 4);
259 }
250 } 260 }
251 } 261 }
252 const QuicConnectionStats stats = connection()->GetStats(); 262 const QuicConnectionStats stats = connection()->GetStats();
253 if (stats.max_sequence_reordering == 0) 263 if (stats.max_sequence_reordering == 0)
254 return; 264 return;
255 const uint64 kMaxReordering = 100; 265 const uint64 kMaxReordering = 100;
256 uint64 reordering = kMaxReordering; 266 uint64 reordering = kMaxReordering;
257 if (stats.min_rtt_us > 0 ) { 267 if (stats.min_rtt_us > 0 ) {
258 reordering = 268 reordering =
259 GG_UINT64_C(100) * stats.max_time_reordering_us / stats.min_rtt_us; 269 GG_UINT64_C(100) * stats.max_time_reordering_us / stats.min_rtt_us;
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
850 return; 860 return;
851 861
852 // TODO(rch): re-enable this code once beta is cut. 862 // TODO(rch): re-enable this code once beta is cut.
853 // if (stream_factory_) 863 // if (stream_factory_)
854 // stream_factory_->OnSessionConnectTimeout(this); 864 // stream_factory_->OnSessionConnectTimeout(this);
855 // CloseAllStreams(ERR_QUIC_HANDSHAKE_FAILED); 865 // CloseAllStreams(ERR_QUIC_HANDSHAKE_FAILED);
856 // DCHECK_EQ(0u, GetNumOpenStreams()); 866 // DCHECK_EQ(0u, GetNumOpenStreams());
857 } 867 }
858 868
859 } // namespace net 869 } // 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