diff options
author | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-23 18:25:06 +0000 |
---|---|---|
committer | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-23 18:25:06 +0000 |
commit | 21b316afcfbe457fcab1ab1fd749595e1fe31696 (patch) | |
tree | 3caa14c1e093b58c95c994fcd0751aa48b99ea97 /net | |
parent | 383cc18b95c085f4feae47e6771ecadac12eab20 (diff) | |
download | chromium_src-21b316afcfbe457fcab1ab1fd749595e1fe31696.zip chromium_src-21b316afcfbe457fcab1ab1fd749595e1fe31696.tar.gz chromium_src-21b316afcfbe457fcab1ab1fd749595e1fe31696.tar.bz2 |
Computer total latency for DNS experiment
r=wtc
Review URL: http://codereview.chromium.org/42518
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12296 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/http/http_network_transaction.cc | 7 | ||||
-rw-r--r-- | net/http/http_network_transaction.h | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc index 4337905..ae1d9fd 100644 --- a/net/http/http_network_transaction.cc +++ b/net/http/http_network_transaction.cc @@ -68,6 +68,7 @@ int HttpNetworkTransaction::Start(const HttpRequestInfo* request_info, UpdateConnectionTypeHistograms(CONNECTION_ANY); request_ = request_info; + start_time_ = base::Time::Now(); next_state_ = STATE_RESOLVE_PROXY; int rv = DoLoop(OK); @@ -949,12 +950,18 @@ void HttpNetworkTransaction::LogTransactionMetrics() const { if (60 < duration.InMinutes()) return; + base::TimeDelta total_duration = base::Time::Now() - start_time_; + UMA_HISTOGRAM_LONG_TIMES(FieldTrial::MakeName("Net.Transaction_Latency", "DnsImpact").data(), duration); UMA_HISTOGRAM_CLIPPED_TIMES(FieldTrial::MakeName( "Net.Transaction_Latency_Under_10", "DnsImpact").data(), duration, base::TimeDelta::FromMilliseconds(1), base::TimeDelta::FromMinutes(10), 100); + UMA_HISTOGRAM_CLIPPED_TIMES(FieldTrial::MakeName( + "Net.Transaction_Latency_Total_Under_10", "DnsImpact").data(), + total_duration, base::TimeDelta::FromMilliseconds(1), + base::TimeDelta::FromMinutes(10), 100); if (!duration.InMilliseconds()) return; UMA_HISTOGRAM_COUNTS("Net.Transaction_Bandwidth", diff --git a/net/http/http_network_transaction.h b/net/http/http_network_transaction.h index 9a0b8e9..088a090 100644 --- a/net/http/http_network_transaction.h +++ b/net/http/http_network_transaction.h @@ -8,6 +8,7 @@ #include <string> #include "base/ref_counted.h" +#include "base/time.h" #include "net/base/address_list.h" #include "net/base/client_socket_handle.h" #include "net/base/host_resolver.h" @@ -281,6 +282,9 @@ class HttpNetworkTransaction : public HttpTransaction { scoped_refptr<IOBuffer> read_buf_; int read_buf_len_; + // The time the Start method was called. + base::Time start_time_; + enum State { STATE_RESOLVE_PROXY, STATE_RESOLVE_PROXY_COMPLETE, |