diff options
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, |