| Index: net/quic/quic_client_session.cc
|
| diff --git a/net/quic/quic_client_session.cc b/net/quic/quic_client_session.cc
|
| index 97d6c3bfbe373353e2166950fe981f6a03ba619d..ef8bc202f1ca5caa3197306a9210d5fd406d3149 100644
|
| --- a/net/quic/quic_client_session.cc
|
| +++ b/net/quic/quic_client_session.cc
|
| @@ -286,6 +286,24 @@ QuicClientSession::~QuicClientSession() {
|
| }
|
| }
|
| const QuicConnectionStats stats = connection()->GetStats();
|
| + if (server_info_ && stats.min_rtt_us > 0) {
|
| + base::TimeTicks wait_for_data_start_time =
|
| + server_info_->wait_for_data_start_time();
|
| + base::TimeTicks wait_for_data_end_time =
|
| + server_info_->wait_for_data_end_time();
|
| + if (!wait_for_data_start_time.is_null() &&
|
| + !wait_for_data_end_time.is_null()) {
|
| + base::TimeDelta wait_time =
|
| + wait_for_data_end_time - wait_for_data_start_time;
|
| + const base::HistogramBase::Sample kMaxWaitToRtt = 1000;
|
| + base::HistogramBase::Sample wait_to_rtt =
|
| + static_cast<base::HistogramBase::Sample>(
|
| + 100 * wait_time.InMicroseconds() / stats.min_rtt_us);
|
| + UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicServerInfo.WaitForDataReadyToRtt",
|
| + wait_to_rtt, 0, kMaxWaitToRtt, 50);
|
| + }
|
| + }
|
| +
|
| if (stats.max_sequence_reordering == 0)
|
| return;
|
| const base::HistogramBase::Sample kMaxReordering = 100;
|
| @@ -300,8 +318,9 @@ QuicClientSession::~QuicClientSession() {
|
| UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicSession.MaxReorderingTimeLongRtt",
|
| reordering, 0, kMaxReordering, 50);
|
| }
|
| - UMA_HISTOGRAM_COUNTS("Net.QuicSession.MaxReordering",
|
| - stats.max_sequence_reordering);
|
| + UMA_HISTOGRAM_COUNTS(
|
| + "Net.QuicSession.MaxReordering",
|
| + static_cast<base::HistogramBase::Sample>(stats.max_sequence_reordering));
|
| }
|
|
|
| void QuicClientSession::OnStreamFrames(
|
| @@ -433,7 +452,7 @@ bool QuicClientSession::GetSSLInfo(SSLInfo* ssl_info) const {
|
| // Report the TLS cipher suite that most closely resembles the crypto
|
| // parameters of the QUIC connection.
|
| QuicTag aead = crypto_stream_->crypto_negotiated_params().aead;
|
| - int cipher_suite;
|
| + uint16 cipher_suite;
|
| int security_bits;
|
| switch (aead) {
|
| case kAESG:
|
| @@ -449,9 +468,7 @@ bool QuicClientSession::GetSSLInfo(SSLInfo* ssl_info) const {
|
| return false;
|
| }
|
| int ssl_connection_status = 0;
|
| - ssl_connection_status |=
|
| - (cipher_suite & SSL_CONNECTION_CIPHERSUITE_MASK) <<
|
| - SSL_CONNECTION_CIPHERSUITE_SHIFT;
|
| + ssl_connection_status |= cipher_suite;
|
| ssl_connection_status |=
|
| (SSL_CONNECTION_VERSION_QUIC & SSL_CONNECTION_VERSION_MASK) <<
|
| SSL_CONNECTION_VERSION_SHIFT;
|
| @@ -584,6 +601,20 @@ void QuicClientSession::OnCryptoHandshakeEvent(CryptoHandshakeEvent event) {
|
| if (event == HANDSHAKE_CONFIRMED) {
|
| UMA_HISTOGRAM_TIMES("Net.QuicSession.HandshakeConfirmedTime",
|
| base::TimeTicks::Now() - handshake_start_);
|
| + if (server_info_) {
|
| + // Track how long it has taken to finish handshake once we start waiting
|
| + // for reading of QUIC server information from disk cache. We could use
|
| + // this data to compare total time taken if we were to cancel the disk
|
| + // cache read vs waiting for the read to complete.
|
| + base::TimeTicks wait_for_data_start_time =
|
| + server_info_->wait_for_data_start_time();
|
| + if (!wait_for_data_start_time.is_null()) {
|
| + UMA_HISTOGRAM_TIMES(
|
| + "Net.QuicServerInfo.WaitForDataReady.HandshakeConfirmedTime",
|
| + base::TimeTicks::Now() - wait_for_data_start_time);
|
| + }
|
| + }
|
| +
|
| ObserverSet::iterator it = observers_.begin();
|
| while (it != observers_.end()) {
|
| Observer* observer = *it;
|
|
|