diff options
author | cbentzel <cbentzel@chromium.org> | 2014-11-01 11:11:10 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-01 18:11:32 +0000 |
commit | 9849a4c0fd6144fa63194a0c83b22de8e9f70c38 (patch) | |
tree | 9147b80e481419f150597c956a8cbd2eb6f1aa80 /net/http | |
parent | ce1b1bf47b9a1f60d604a5f766a28e4948e598dc (diff) | |
download | chromium_src-9849a4c0fd6144fa63194a0c83b22de8e9f70c38.zip chromium_src-9849a4c0fd6144fa63194a0c83b22de8e9f70c38.tar.gz chromium_src-9849a4c0fd6144fa63194a0c83b22de8e9f70c38.tar.bz2 |
Remove Network transaction timing histograms.
BUG=429300
Review URL: https://codereview.chromium.org/695993003
Cr-Commit-Position: refs/heads/master@{#302389}
Diffstat (limited to 'net/http')
-rw-r--r-- | net/http/http_network_transaction.cc | 78 | ||||
-rw-r--r-- | net/http/http_network_transaction.h | 14 |
2 files changed, 0 insertions, 92 deletions
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc index 5f7fcab4..d29342e 100644 --- a/net/http/http_network_transaction.cc +++ b/net/http/http_network_transaction.cc @@ -64,9 +64,6 @@ #include "url/gurl.h" #include "url/url_canon.h" -using base::Time; -using base::TimeDelta; - namespace net { namespace { @@ -133,7 +130,6 @@ HttpNetworkTransaction::HttpNetworkTransaction(RequestPriority priority, request_(NULL), priority_(priority), headers_valid_(false), - logged_response_time_(false), fallback_error_code_(ERR_SSL_INAPPROPRIATE_FALLBACK), request_headers_(), read_buf_len_(0), @@ -184,7 +180,6 @@ int HttpNetworkTransaction::Start(const HttpRequestInfo* request_info, net_log_ = net_log; request_ = request_info; - start_time_ = base::Time::Now(); if (request_->load_flags & LOAD_DISABLE_CERT_REVOCATION_CHECKING) { server_ssl_config_.rev_checking_enabled = false; @@ -986,12 +981,6 @@ int HttpNetworkTransaction::DoReadHeadersComplete(int result) { return OK; } - // After we call RestartWithAuth a new response_time will be recorded, and - // we need to be cautious about incorrectly logging the duration across the - // authentication activity. - if (result == OK) - LogTransactionConnectedMetrics(); - // ERR_CONNECTION_CLOSED is treated differently at this point; if partial // response headers were received, we do the best we can to make sense of it // and send it back up the stack. @@ -1116,7 +1105,6 @@ int HttpNetworkTransaction::DoReadBodyComplete(int result) { // Clean up connection if we are done. if (done) { - LogTransactionMetrics(); stream_->Close(!keep_alive); // Note: we don't reset the stream here. We've closed it, but we still // need it around so that callers can call methods such as @@ -1168,72 +1156,6 @@ int HttpNetworkTransaction::DoDrainBodyForAuthRestartComplete(int result) { return OK; } -void HttpNetworkTransaction::LogTransactionConnectedMetrics() { - if (logged_response_time_) - return; - - logged_response_time_ = true; - - base::TimeDelta total_duration = response_.response_time - start_time_; - - UMA_HISTOGRAM_CUSTOM_TIMES( - "Net.Transaction_Connected", - total_duration, - base::TimeDelta::FromMilliseconds(1), base::TimeDelta::FromMinutes(10), - 100); - - bool reused_socket = stream_->IsConnectionReused(); - if (!reused_socket) { - UMA_HISTOGRAM_CUSTOM_TIMES( - "Net.Transaction_Connected_New_b", - total_duration, - base::TimeDelta::FromMilliseconds(1), base::TimeDelta::FromMinutes(10), - 100); - } - - // Currently, non-HIGHEST priority requests are frame or sub-frame resource - // types. This will change when we also prioritize certain subresources like - // css, js, etc. - if (priority_ != HIGHEST) { - UMA_HISTOGRAM_CUSTOM_TIMES( - "Net.Priority_High_Latency_b", - total_duration, - base::TimeDelta::FromMilliseconds(1), base::TimeDelta::FromMinutes(10), - 100); - } else { - UMA_HISTOGRAM_CUSTOM_TIMES( - "Net.Priority_Low_Latency_b", - total_duration, - base::TimeDelta::FromMilliseconds(1), base::TimeDelta::FromMinutes(10), - 100); - } -} - -void HttpNetworkTransaction::LogTransactionMetrics() const { - base::TimeDelta duration = base::Time::Now() - - response_.request_time; - if (60 < duration.InMinutes()) - return; - - base::TimeDelta total_duration = base::Time::Now() - start_time_; - - UMA_HISTOGRAM_CUSTOM_TIMES("Net.Transaction_Latency_b", duration, - base::TimeDelta::FromMilliseconds(1), - base::TimeDelta::FromMinutes(10), - 100); - UMA_HISTOGRAM_CUSTOM_TIMES("Net.Transaction_Latency_Total", - total_duration, - base::TimeDelta::FromMilliseconds(1), - base::TimeDelta::FromMinutes(10), 100); - - if (!stream_->IsConnectionReused()) { - UMA_HISTOGRAM_CUSTOM_TIMES( - "Net.Transaction_Latency_Total_New_Connection", - total_duration, base::TimeDelta::FromMilliseconds(1), - base::TimeDelta::FromMinutes(10), 100); - } -} - int HttpNetworkTransaction::HandleCertificateRequest(int error) { // There are two paths through which the server can request a certificate // from us. The first is during the initial handshake, the second is diff --git a/net/http/http_network_transaction.h b/net/http/http_network_transaction.h index c7c217d..47f34eb 100644 --- a/net/http/http_network_transaction.h +++ b/net/http/http_network_transaction.h @@ -178,12 +178,6 @@ class NET_EXPORT_PRIVATE HttpNetworkTransaction void BuildRequestHeaders(bool using_proxy); - // Record histogram of time until first byte of header is received. - void LogTransactionConnectedMetrics(); - - // Record histogram of latency (durations until last byte received). - void LogTransactionMetrics() const; - // Writes a log message to help debugging in the field when we block a proxy // response to a CONNECT request. void LogBlockedTunnelResponse(int response_code) const; @@ -282,11 +276,6 @@ class NET_EXPORT_PRIVATE HttpNetworkTransaction // True if we've validated the headers that the stream parser has returned. bool headers_valid_; - // True if we've logged the time of the first response byte. Used to - // prevent logging across authentication activity where we see multiple - // responses. - bool logged_response_time_; - SSLConfig server_ssl_config_; SSLConfig proxy_ssl_config_; // fallback_error_code contains the error code that caused the last TLS @@ -310,9 +299,6 @@ class NET_EXPORT_PRIVATE HttpNetworkTransaction // Total number of bytes received on streams for this transaction. int64 total_received_bytes_; - // The time the Start method was called. - base::Time start_time_; - // When the transaction started / finished sending the request, including // the body, if present. base::TimeTicks send_start_time_; |