diff options
author | mtomasz@chromium.org <mtomasz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-07 03:34:18 +0000 |
---|---|---|
committer | mtomasz@chromium.org <mtomasz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-07 03:34:18 +0000 |
commit | 1abc2b14c8dcbb457e7daebdd187714b6b600147 (patch) | |
tree | 440786368149597177200540dff2c8006ced7bfc | |
parent | 9d31862b725809f217e44b218cb11df56fc55e7f (diff) | |
download | chromium_src-1abc2b14c8dcbb457e7daebdd187714b6b600147.zip chromium_src-1abc2b14c8dcbb457e7daebdd187714b6b600147.tar.gz chromium_src-1abc2b14c8dcbb457e7daebdd187714b6b600147.tar.bz2 |
Revert 227233 "Added histograms to see if the interval between c..."
> Added histograms to see if the interval between consecutive connects has
> an impact on connect time.
>
> R=jar@chromium.org
> NOTRY=true
>
> Review URL: https://codereview.chromium.org/26098002
TBR=rtenneti@chromium.org
Review URL: https://codereview.chromium.org/26212002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227243 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | net/socket/transport_client_socket_pool.cc | 42 | ||||
-rw-r--r-- | net/socket/transport_client_socket_pool.h | 4 |
2 files changed, 1 insertions, 45 deletions
diff --git a/net/socket/transport_client_socket_pool.cc b/net/socket/transport_client_socket_pool.cc index 87bfc6a..d03e3e6 100644 --- a/net/socket/transport_client_socket_pool.cc +++ b/net/socket/transport_client_socket_pool.cc @@ -7,12 +7,10 @@ #include <algorithm> #include "base/compiler_specific.h" -#include "base/lazy_instance.h" #include "base/logging.h" #include "base/message_loop/message_loop.h" #include "base/metrics/histogram.h" #include "base/strings/string_util.h" -#include "base/synchronization/lock.h" #include "base/time/time.h" #include "base/values.h" #include "net/base/ip_endpoint.h" @@ -48,13 +46,6 @@ bool AddressListOnlyContainsIPv6(const AddressList& list) { } // namespace -// This lock protects |g_last_connect_time|. -static base::LazyInstance<base::Lock>::Leaky - g_last_connect_time_lock = LAZY_INSTANCE_INITIALIZER; - -// |g_last_connect_time| has the last time a connect() call is made. -static base::TimeTicks g_last_connect_time; - TransportSocketParams::TransportSocketParams( const HostPortPair& host_port_pair, bool disable_resolver_cache, @@ -94,8 +85,7 @@ TransportConnectJob::TransportConnectJob( params_(params), client_socket_factory_(client_socket_factory), resolver_(host_resolver), - next_state_(STATE_NONE), - less_than_20ms_since_connect_(true) { + next_state_(STATE_NONE) { } TransportConnectJob::~TransportConnectJob() { @@ -196,20 +186,6 @@ int TransportConnectJob::DoResolveHostComplete(int result) { } int TransportConnectJob::DoTransportConnect() { - base::TimeTicks now = base::TimeTicks::Now(); - base::TimeTicks last_connect_time; - { - base::AutoLock lock(g_last_connect_time_lock.Get()); - last_connect_time = g_last_connect_time; - g_last_connect_time = now; - } - if (last_connect_time.is_null() || - (now - last_connect_time).InMilliseconds() < 20) { - less_than_20ms_since_connect_ = true; - } else { - less_than_20ms_since_connect_ = false; - } - next_state_ = STATE_TRANSPORT_CONNECT_COMPLETE; transport_socket_ = client_socket_factory_->CreateTransportClientSocket( addresses_, net_log().net_log(), net_log().source()); @@ -246,22 +222,6 @@ int TransportConnectJob::DoTransportConnectComplete(int result) { base::TimeDelta::FromMinutes(10), 100); - if (less_than_20ms_since_connect_) { - UMA_HISTOGRAM_CUSTOM_TIMES( - "Net.TCP_Connection_Latency_Interval_20ms_Minus", - connect_duration, - base::TimeDelta::FromMilliseconds(1), - base::TimeDelta::FromMinutes(10), - 100); - } else { - UMA_HISTOGRAM_CUSTOM_TIMES( - "Net.TCP_Connection_Latency_Interval_20ms_Plus", - connect_duration, - base::TimeDelta::FromMilliseconds(1), - base::TimeDelta::FromMinutes(10), - 100); - } - if (is_ipv4) { UMA_HISTOGRAM_CUSTOM_TIMES("Net.TCP_Connection_Latency_IPv4_No_Race", connect_duration, diff --git a/net/socket/transport_client_socket_pool.h b/net/socket/transport_client_socket_pool.h index 95b51c3..16e421a 100644 --- a/net/socket/transport_client_socket_pool.h +++ b/net/socket/transport_client_socket_pool.h @@ -125,10 +125,6 @@ class NET_EXPORT_PRIVATE TransportConnectJob : public ConnectJob { base::TimeTicks fallback_connect_start_time_; base::OneShotTimer<TransportConnectJob> fallback_timer_; - // If the interval between this connect and previous connect is less than - // 20ms, then |less_than_20ms_since_connect_| is set to true. - bool less_than_20ms_since_connect_; - DISALLOW_COPY_AND_ASSIGN(TransportConnectJob); }; |