diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-14 06:31:32 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-14 06:31:32 +0000 |
commit | ec581fc47811f98623f8293ee98cef6936b3aba8 (patch) | |
tree | 445bbea7731667f74e4a1f04eeb72ce0e5a53393 /net/socket/tcp_client_socket_pool.cc | |
parent | 078fa60e19a8297e67db1c3ca8e727a867f57b57 (diff) | |
download | chromium_src-ec581fc47811f98623f8293ee98cef6936b3aba8.zip chromium_src-ec581fc47811f98623f8293ee98cef6936b3aba8.tar.gz chromium_src-ec581fc47811f98623f8293ee98cef6936b3aba8.tar.bz2 |
Switch on socket late binding.
Histograms for the 4.0.266.0 dev channel release indicate the following changes for late binding:
(a) Net.TCPSocketType shows a decrease (from 41.85% to 39.29%) in used of newly connected sockets. Part of this decrease is due to using previously used sockets more often (increase from 58.15% to 58.53%), but is primarily due to being able to use sockets that were connected, but not immediately handed over to a socket request (increased from 0 [not supported without late binding] to 2.18%).
(b) Net.SocketIdleTimeBeforeNextUse_ReusedSocket indicates that reused sockets are getting used more quickly than before, with a decrease of mean idle time from 11.65 seconds to 11.34 seconds.
(c) Net.Transaction_Connected_Under_10 indicates shows that the mean for time until the first byte of the transaction response decreased from 1585ms to 1481ms.
The code change deletes the old non socket late binding code paths, cleaning up the code significantly. It also deletes duplicated tests in ClientSocketPoolBase which covered both pathways. A TCPClientSocketPool test had to be updated as well.
BUG=http://crbug.com/30354.
Review URL: http://codereview.chromium.org/543051
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36230 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket/tcp_client_socket_pool.cc')
-rw-r--r-- | net/socket/tcp_client_socket_pool.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/socket/tcp_client_socket_pool.cc b/net/socket/tcp_client_socket_pool.cc index a64c073..e37bfe7 100644 --- a/net/socket/tcp_client_socket_pool.cc +++ b/net/socket/tcp_client_socket_pool.cc @@ -33,13 +33,12 @@ static const int kTCPConnectJobTimeoutInSeconds = 240; // 4 minutes. TCPConnectJob::TCPConnectJob( const std::string& group_name, const HostResolver::RequestInfo& resolve_info, - const ClientSocketHandle* handle, base::TimeDelta timeout_duration, ClientSocketFactory* client_socket_factory, HostResolver* host_resolver, Delegate* delegate, LoadLog* load_log) - : ConnectJob(group_name, handle, timeout_duration, delegate, load_log), + : ConnectJob(group_name, timeout_duration, delegate, load_log), resolve_info_(resolve_info), client_socket_factory_(client_socket_factory), ALLOW_THIS_IN_INITIALIZER_LIST( @@ -161,7 +160,7 @@ ConnectJob* TCPClientSocketPool::TCPConnectJobFactory::NewConnectJob( ConnectJob::Delegate* delegate, LoadLog* load_log) const { return new TCPConnectJob( - group_name, request.params(), request.handle(), + group_name, request.params(), base::TimeDelta::FromSeconds(kTCPConnectJobTimeoutInSeconds), client_socket_factory_, host_resolver_, delegate, load_log); } |