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

Unified Diff: components/precache/core/precache_fetcher.cc

Issue 2278793002: Report the wasted network bytes when resource prefetches hit max limit (Closed)
Patch Set: minor fix Created 4 years, 4 months 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: components/precache/core/precache_fetcher.cc
diff --git a/components/precache/core/precache_fetcher.cc b/components/precache/core/precache_fetcher.cc
index 8b7589ba8696053987166343f2a461f8a80ffaea..3b4dfe573bf6a5f38d4fee73b79175415c232947 100644
--- a/components/precache/core/precache_fetcher.cc
+++ b/components/precache/core/precache_fetcher.cc
@@ -280,6 +280,10 @@ void PrecacheFetcher::Fetcher::OnURLFetchDownloadProgress(
response_bytes_ = network_response_bytes_ = current;
was_cached_ = source->WasCached();
+ UMA_HISTOGRAM_CUSTOM_COUNTS("Precache.Fetch.ResponseBytes.NetworkWasted",
+ network_response_bytes_, 1, kMaxResponseBytes,
Steven Holte 2016/08/30 22:33:26 You probably shouldn't use kMaxResponseBytes here,
Raj 2016/09/14 00:14:36 Done.
+ 100);
+
// Cancel the download.
network_url_fetcher_.reset();
callback_.Run(*this);
« 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