| Index: content/browser/download/download_stats.cc
|
| diff --git a/content/browser/download/download_stats.cc b/content/browser/download/download_stats.cc
|
| index ed24173103d329447919b88f2719b61ad1ccbd6f..708615419d511191b4d563bd5c0584f514c90476 100644
|
| --- a/content/browser/download/download_stats.cc
|
| +++ b/content/browser/download/download_stats.cc
|
| @@ -819,16 +819,34 @@ void RecordParallelizableDownloadStats(
|
|
|
| base::TimeDelta time_saved;
|
| if (bytes_downloaded_with_parallel_streams > 0) {
|
| + int64_t bandwidth_with_parallel_streams = CalculateBandwidthBytesPerSecond(
|
| + bytes_downloaded_with_parallel_streams, time_with_parallel_streams);
|
| RecordBandwidthMetric(
|
| "Download.ParallelizableDownloadBandwidth."
|
| "WithParallelRequestsMultipleStreams",
|
| - CalculateBandwidthBytesPerSecond(bytes_downloaded_with_parallel_streams,
|
| - time_with_parallel_streams));
|
| + bandwidth_with_parallel_streams);
|
| if (bandwidth_without_parallel_streams > 0) {
|
| time_saved = base::TimeDelta::FromMilliseconds(
|
| 1000.0 * bytes_downloaded_with_parallel_streams /
|
| bandwidth_without_parallel_streams) -
|
| time_with_parallel_streams;
|
| + int bandwidth_ratio_percentage =
|
| + (100.0 * bandwidth_with_parallel_streams) /
|
| + bandwidth_without_parallel_streams;
|
| + UMA_HISTOGRAM_CUSTOM_COUNTS(
|
| + "Download.ParallelDownload.BandwidthRatioPercentage",
|
| + bandwidth_ratio_percentage, 0, 400, 101);
|
| + base::TimeDelta total_time =
|
| + time_with_parallel_streams + time_without_parallel_streams;
|
| + size_t total_size = bytes_downloaded_with_parallel_streams +
|
| + bytes_downloaded_without_parallel_streams;
|
| + base::TimeDelta non_parallel_time = base::TimeDelta::FromSecondsD(
|
| + static_cast<double>(total_size) / bandwidth_without_parallel_streams);
|
| + int time_ratio_percentage =
|
| + 100.0 * total_time.InSecondsF() / non_parallel_time.InSecondsF();
|
| + UMA_HISTOGRAM_CUSTOM_COUNTS(
|
| + "Download.ParallelDownload.TotalTimeRatioPercentage",
|
| + time_ratio_percentage, 0, 200, 101);
|
| }
|
| }
|
|
|
|
|