Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2122)

Unified Diff: net/url_request/url_request_http_job.cc

Issue 2548613003: [HttpJob] Record bytes read for requests (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_http_job.cc
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc
index 6934c78006ce18b4cebbc351cbadcdc51345e17d..4bfae6b3cb90e78ca8c62e48f54102e1005cc008 100644
--- a/net/url_request/url_request_http_job.cc
+++ b/net/url_request/url_request_http_job.cc
@@ -1502,9 +1502,21 @@ void URLRequestHttpJob::RecordPerfHistograms(CompletionCause reason) {
}
}
- if (request_info_.load_flags & LOAD_PREFETCH && !request_->was_cached())
- UMA_HISTOGRAM_COUNTS("Net.Prefetch.PrefilterBytesReadFromNetwork",
- prefilter_bytes_read());
+ UMA_HISTOGRAM_CUSTOM_COUNTS("Net.HttpJob.PrefilterBytesRead",
+ prefilter_bytes_read(), 1, 50000000, 50);
+
+ if (request_->was_cached()) {
mmenke 2016/12/02 14:58:49 Can we just grab this from response_info_ instead?
jkarlin 2016/12/02 15:06:23 Done.
+ UMA_HISTOGRAM_CUSTOM_COUNTS("Net.HttpJob.PrefilterBytesRead.Cache",
+ prefilter_bytes_read(), 1, 50000000, 50);
+ } else {
+ UMA_HISTOGRAM_CUSTOM_COUNTS("Net.HttpJob.PrefilterBytesRead.Net",
+ prefilter_bytes_read(), 1, 50000000, 50);
+
+ if (request_info_.load_flags & LOAD_PREFETCH) {
+ UMA_HISTOGRAM_COUNTS("Net.Prefetch.PrefilterBytesReadFromNetwork",
+ prefilter_bytes_read());
+ }
+ }
start_time_ = base::TimeTicks();
}
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698