Commit c4338da0 authored by rch@chromium.org's avatar rch@chromium.org

Add a new histogram Net.QuicSession.HandshakeConfirmedTime which tracks

the elapsed time between starting the crypto handshake, and receiving
confirmation from the server.

Review URL: https://codereview.chromium.org/318143002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275654 0039d316-1c4b-4281-b951-d872f2087c98
parent e8ca0f51
......@@ -435,6 +435,7 @@ bool QuicClientSession::GetSSLInfo(SSLInfo* ssl_info) const {
int QuicClientSession::CryptoConnect(bool require_confirmation,
const CompletionCallback& callback) {
require_confirmation_ = require_confirmation;
handshake_start_ = base::TimeTicks::Now();
RecordHandshakeState(STATE_STARTED);
if (!crypto_stream_->CryptoConnect()) {
// TODO(wtc): change crypto_stream_.CryptoConnect() to return a
......@@ -544,6 +545,8 @@ void QuicClientSession::OnCryptoHandshakeEvent(CryptoHandshakeEvent event) {
base::ResetAndReturn(&callback_).Run(OK);
}
if (event == HANDSHAKE_CONFIRMED) {
UMA_HISTOGRAM_TIMES("Net.QuicSession.HandshakeConfirmedTime",
base::TimeTicks::Now() - handshake_start_);
ObserverSet::iterator it = observers_.begin();
while (it != observers_.end()) {
Observer* observer = *it;
......
......@@ -15,6 +15,7 @@
#include "base/basictypes.h"
#include "base/containers/hash_tables.h"
#include "base/memory/scoped_ptr.h"
#include "base/time/time.h"
#include "net/base/completion_callback.h"
#include "net/proxy/proxy_server.h"
#include "net/quic/quic_client_session_base.h"
......@@ -235,6 +236,7 @@ class NET_EXPORT_PRIVATE QuicClientSession : public QuicClientSessionBase {
size_t num_total_streams_;
base::TaskRunner* task_runner_;
BoundNetLog net_log_;
base::TimeTicks handshake_start_; // Time the handshake was started.
QuicConnectionLogger logger_;
// Number of packets read in the current read loop.
size_t num_packets_read_;
......
......@@ -14297,6 +14297,14 @@ Therefore, the affected-histogram name has to have at least one dot in it.
</summary>
</histogram>
<histogram name="Net.QuicSession.HandshakeConfirmedTime" units="Milliseconds">
<owner>rch@chromium.org</owner>
<summary>
The elapsed time between starting the crypto handshake, and receiving
confirmation from the server.
</summary>
</histogram>
<histogram name="Net.QuicSession.HandshakeRoundTrips" units="RTTs">
<obsolete>
see Net.QuicSession.Connect*PortForHTTP*
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment