Commit a30b7788 authored by rajendrant's avatar rajendrant Committed by Commit bot

Report the wasted network bytes when resource prefetches hit max limit

BUG=625270

Review-Url: https://codereview.chromium.org/2278793002
Cr-Commit-Position: refs/heads/master@{#418646}
parent 50a94860
...@@ -280,6 +280,10 @@ void PrecacheFetcher::Fetcher::OnURLFetchDownloadProgress( ...@@ -280,6 +280,10 @@ void PrecacheFetcher::Fetcher::OnURLFetchDownloadProgress(
response_bytes_ = network_response_bytes_ = current; response_bytes_ = network_response_bytes_ = current;
was_cached_ = source->WasCached(); was_cached_ = source->WasCached();
UMA_HISTOGRAM_CUSTOM_COUNTS("Precache.Fetch.ResponseBytes.NetworkWasted",
network_response_bytes_, 1,
1024 * 1024 /* 1 MB */, 100);
// Cancel the download. // Cancel the download.
network_url_fetcher_.reset(); network_url_fetcher_.reset();
callback_.Run(*this); callback_.Run(*this);
......
...@@ -45291,6 +45291,17 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries. ...@@ -45291,6 +45291,17 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
</summary> </summary>
</histogram> </histogram>
<histogram name="Precache.Fetch.ResponseBytes.NetworkWasted" units="bytes">
<owner>rajendrant@chromium.org</owner>
<owner>bengr@chromium.org</owner>
<summary>
The total number of response bytes received over the network for a wasted
resource precache fetch. Logged when a partially downloaded resource
precache fetch gets cancelled due to per-resource size limit or max precache
size limit.
</summary>
</histogram>
<histogram name="Precache.Fetch.ResponseBytes.Total" units="bytes"> <histogram name="Precache.Fetch.ResponseBytes.Total" units="bytes">
<owner>twifkak@chromium.org</owner> <owner>twifkak@chromium.org</owner>
<owner>bengr@chromium.org</owner> <owner>bengr@chromium.org</owner>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment