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

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

Issue 2278793002: Report the wasted network bytes when resource prefetches hit max limit (Closed)
Patch Set: 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') | tools/metrics/histograms/histograms.xml » ('J')
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 a5cf65086d2f665ced1263529f2e433788d25c9e..51a0325701a7dd04ed3aa6d39bdee99b5a9cc6db 100644
--- a/components/precache/core/precache_fetcher.cc
+++ b/components/precache/core/precache_fetcher.cc
@@ -243,10 +243,14 @@ void PrecacheFetcher::Fetcher::OnURLFetchDownloadProgress(
// Cancel the download.
network_url_fetcher_.reset();
- // Call the completion callback, to attempt the next download, or to trigger
- // cleanup in precache_delegate_->OnDone().
response_bytes_ = network_response_bytes_ = current;
+ UMA_HISTOGRAM_CUSTOM_COUNTS("Precache.Fetch.ResponseBytes.NetworkWasted",
+ network_response_bytes_, 1, kMaxResponseBytes,
+ 100);
+
+ // Call the completion callback, to attempt the next download, or to trigger
+ // cleanup in precache_delegate_->OnDone().
callback_.Run(*this);
}
}
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | tools/metrics/histograms/histograms.xml » ('J')

Powered by Google App Engine
This is Rietveld 408576698