From 3a3a617805faf1f681155fdfddd2de0b47a4244f Mon Sep 17 00:00:00 2001 From: "eroman@chromium.org" Date: Thu, 28 Jan 2010 00:05:08 +0000 Subject: Add a histogram to record how long fetching the system proxy settings takes: Net.ProxyPollConfigurationTime On Windows, this corresponds to the duration of WinHttpGetIEProxyConfigForCurrentUser(), which we have seen can run very slowly on some systesm. This histogram tries to gauge the extent of the problem. BUG=12189 Review URL: http://codereview.chromium.org/553122 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37352 0039d316-1c4b-4281-b951-d872f2087c98 --- net/proxy/proxy_service.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'net/proxy') diff --git a/net/proxy/proxy_service.cc b/net/proxy/proxy_service.cc index c5bb70c..fb607ec 100644 --- a/net/proxy/proxy_service.cc +++ b/net/proxy/proxy_service.cc @@ -597,11 +597,22 @@ void ProxyService::UpdateConfig(LoadLog* load_log) { ProxyConfig latest; // Fetch the proxy settings. + TimeTicks start_time = TimeTicks::Now(); LoadLog::BeginEvent(load_log, LoadLog::TYPE_PROXY_SERVICE_POLL_CONFIG_SERVICE_FOR_CHANGES); int rv = config_service_->GetProxyConfig(&latest); LoadLog::EndEvent(load_log, LoadLog::TYPE_PROXY_SERVICE_POLL_CONFIG_SERVICE_FOR_CHANGES); + TimeTicks end_time = TimeTicks::Now(); + + // Record how long the call to config_service_->GetConfig() above took. + // On some setups of Windows, we have reports that querying the system + // proxy settings can take multiple seconds (http://crbug.com/12189). + UMA_HISTOGRAM_CUSTOM_TIMES("Net.ProxyPollConfigurationTime", + end_time - start_time, + TimeDelta::FromMilliseconds(1), + TimeDelta::FromSeconds(30), + 50); if (rv != OK) { if (is_first_update) { -- cgit v1.1