diff options
author | ziadh@chromium.org <ziadh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-09 05:14:49 +0000 |
---|---|---|
committer | ziadh@chromium.org <ziadh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-09 05:14:49 +0000 |
commit | 9754649b5f77ee7d4515329699cd9f3429daa7d4 (patch) | |
tree | 3fe32353ff4cd71437dbd7c97f9d0dd08541579c | |
parent | 520e7f3fec37b2a1878884848fffbfda39b819ce (diff) | |
download | chromium_src-9754649b5f77ee7d4515329699cd9f3429daa7d4.zip chromium_src-9754649b5f77ee7d4515329699cd9f3429daa7d4.tar.gz chromium_src-9754649b5f77ee7d4515329699cd9f3429daa7d4.tar.bz2 |
More metrics for proxy connections impact A/B test.
I added socket request times (for new/unused sockets). The hypothesis is that
if proxy servers get overloaded, we will see an increase in request times for
new sockets. Hence, we know that we should tone back a little.
BUG=44501
r=jar
Review URL: http://codereview.chromium.org/3040049
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55377 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/browser_main.cc | 8 | ||||
-rw-r--r-- | chrome/renderer/render_view.cc | 4 | ||||
-rw-r--r-- | net/http/http_network_transaction.cc | 1 | ||||
-rw-r--r-- | net/socket/client_socket_pool_histograms.cc | 30 | ||||
-rw-r--r-- | net/socket/client_socket_pool_histograms.h | 3 |
5 files changed, 39 insertions, 7 deletions
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc index 79f3f0d..cf806fc 100644 --- a/chrome/browser/browser_main.cc +++ b/chrome/browser/browser_main.cc @@ -284,14 +284,14 @@ void BrowserMainParts::ProxyConnectionsFieldTrial() { int proxy_connections_8 = -1; if (net::HttpNetworkSession::max_sockets_per_group() <= 8) { proxy_connections_8 = - proxy_connection_trial->AppendGroup("_proxy_connections_8", + proxy_connection_trial->AppendGroup("proxy_connections_8", kProxyConnectionProbability); } const int proxy_connections_16 = - proxy_connection_trial->AppendGroup("_proxy_connections_16", + proxy_connection_trial->AppendGroup("proxy_connections_16", kProxyConnectionProbability); const int proxy_connections_64 = - proxy_connection_trial->AppendGroup("_proxy_connections_64", + proxy_connection_trial->AppendGroup("proxy_connections_64", kProxyConnectionProbability); // This (32 connections per proxy server) is the current default value. @@ -299,7 +299,7 @@ void BrowserMainParts::ProxyConnectionsFieldTrial() { // maintaining that the default group always has the remainder of the "share", // which allows for cleaner and quicker changes down the line if needed. const int proxy_connections_32 = - proxy_connection_trial->AppendGroup("_proxy_connections_32", + proxy_connection_trial->AppendGroup("proxy_connections_32", FieldTrial::kAllRemainingProbability); const int proxy_connections_trial_group = proxy_connection_trial->group(); diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc index 6831d09..b863fbb 100644 --- a/chrome/renderer/render_view.cc +++ b/chrome/renderer/render_view.cc @@ -4692,10 +4692,10 @@ void RenderView::DumpLoadHistograms() const { // impact on PLT. // TODO(jar): Consider removing the per-link-type versions. We // really only need LINK_LOAD_NORMAL and NORMAL_LOAD. - static bool use_conn_impact_histogram( + static bool use_connection_impact_histogram( FieldTrialList::Find("ConnCountImpact") && !FieldTrialList::Find("ConnCountImpact")->group_name().empty()); - if (use_conn_impact_histogram) { + if (use_connection_impact_histogram) { UMA_HISTOGRAM_ENUMERATION( FieldTrial::MakeName("PLT.Abandoned", "ConnCountImpact"), abandoned_page ? 1 : 0, 2); diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc index 22f4717..7b2f944 100644 --- a/net/http/http_network_transaction.cc +++ b/net/http/http_network_transaction.cc @@ -1340,6 +1340,7 @@ int HttpNetworkTransaction::DoDrainBodyForAuthRestartComplete(int result) { return OK; } +// static void HttpNetworkTransaction::LogHttpConnectedMetrics( const ClientSocketHandle& handle) { UMA_HISTOGRAM_ENUMERATION("Net.HttpSocketType", handle.reuse_type(), diff --git a/net/socket/client_socket_pool_histograms.cc b/net/socket/client_socket_pool_histograms.cc index e86543d..396b4ce 100644 --- a/net/socket/client_socket_pool_histograms.cc +++ b/net/socket/client_socket_pool_histograms.cc @@ -6,13 +6,16 @@ #include <string> +#include "base/field_trial.h" #include "base/histogram.h" #include "net/socket/client_socket_handle.h" namespace net { ClientSocketPoolHistograms::ClientSocketPoolHistograms( - const std::string& pool_name) { + const std::string& pool_name) + : is_http_proxy_connection_(false), + is_socks_connection_(false) { // UMA_HISTOGRAM_ENUMERATION socket_type_ = LinearHistogram::FactoryGet("Net.SocketType_" + pool_name, 1, ClientSocketHandle::NUM_TYPES, ClientSocketHandle::NUM_TYPES + 1, @@ -35,6 +38,11 @@ ClientSocketPoolHistograms::ClientSocketPoolHistograms( base::TimeDelta::FromMilliseconds(1), base::TimeDelta::FromMinutes(6), 100, Histogram::kUmaTargetedHistogramFlag); + + if (pool_name == "HTTPProxy") + is_http_proxy_connection_ = true; + else if (pool_name == "SOCK") + is_socks_connection_ = true; } void ClientSocketPoolHistograms::AddSocketType(int type) const { @@ -43,6 +51,26 @@ void ClientSocketPoolHistograms::AddSocketType(int type) const { void ClientSocketPoolHistograms::AddRequestTime(base::TimeDelta time) const { request_time_->AddTime(time); + + static bool proxy_connection_impact_trial_exists( + FieldTrialList::Find("ProxyConnectionImpact") && + !FieldTrialList::Find("ProxyConnectionImpact")->group_name().empty()); + if (proxy_connection_impact_trial_exists && is_http_proxy_connection_) { + UMA_HISTOGRAM_CUSTOM_TIMES( + FieldTrial::MakeName("Net.HttpProxySocketRequestTime", + "ProxyConnectionImpact"), + time, + base::TimeDelta::FromMilliseconds(1), base::TimeDelta::FromMinutes(10), + 100); + } + if (proxy_connection_impact_trial_exists && is_socks_connection_) { + UMA_HISTOGRAM_CUSTOM_TIMES( + FieldTrial::MakeName("Net.SocksSocketRequestTime", + "ProxyConnectionImpact"), + time, + base::TimeDelta::FromMilliseconds(1), base::TimeDelta::FromMinutes(10), + 100); + } } void ClientSocketPoolHistograms::AddUnusedIdleTime(base::TimeDelta time) const { diff --git a/net/socket/client_socket_pool_histograms.h b/net/socket/client_socket_pool_histograms.h index 01c38a2..7485c2f 100644 --- a/net/socket/client_socket_pool_histograms.h +++ b/net/socket/client_socket_pool_histograms.h @@ -31,6 +31,9 @@ class ClientSocketPoolHistograms scoped_refptr<Histogram> request_time_; scoped_refptr<Histogram> unused_idle_time_; scoped_refptr<Histogram> reused_idle_time_; + + bool is_http_proxy_connection_; + bool is_socks_connection_; }; } // namespace net |