Commit 231f7a25 authored by bolian@chromium.org's avatar bolian@chromium.org

Reporting data reduction proxy related daily content lengths if even they are zeros.

BUG=376486

Review URL: https://codereview.chromium.org/324503003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275631 0039d316-1c4b-4281-b951-d872f2087c98
parent f918fc52
...@@ -112,16 +112,15 @@ void RecordDailyContentLengthHistograms( ...@@ -112,16 +112,15 @@ void RecordDailyContentLengthHistograms(
"Net.DailyContentPercent_DataReductionProxyEnabled", "Net.DailyContentPercent_DataReductionProxyEnabled",
(100 * received_length_with_data_reduction_enabled) / received_length); (100 * received_length_with_data_reduction_enabled) / received_length);
if (https_length_with_data_reduction_enabled > 0) { DCHECK_GE(https_length_with_data_reduction_enabled, 0);
UMA_HISTOGRAM_COUNTS( UMA_HISTOGRAM_COUNTS(
"Net.DailyContentLength_DataReductionProxyEnabled_Https", "Net.DailyContentLength_DataReductionProxyEnabled_Https",
https_length_with_data_reduction_enabled >> 10); https_length_with_data_reduction_enabled >> 10);
UMA_HISTOGRAM_PERCENTAGE( UMA_HISTOGRAM_PERCENTAGE(
"Net.DailyContentPercent_DataReductionProxyEnabled_Https", "Net.DailyContentPercent_DataReductionProxyEnabled_Https",
(100 * https_length_with_data_reduction_enabled) / received_length); (100 * https_length_with_data_reduction_enabled) / received_length);
}
if (short_bypass_length_with_data_reduction_enabled > 0) { DCHECK_GE(short_bypass_length_with_data_reduction_enabled, 0);
UMA_HISTOGRAM_COUNTS( UMA_HISTOGRAM_COUNTS(
"Net.DailyContentLength_DataReductionProxyEnabled_ShortBypass", "Net.DailyContentLength_DataReductionProxyEnabled_ShortBypass",
short_bypass_length_with_data_reduction_enabled >> 10); short_bypass_length_with_data_reduction_enabled >> 10);
...@@ -129,9 +128,8 @@ void RecordDailyContentLengthHistograms( ...@@ -129,9 +128,8 @@ void RecordDailyContentLengthHistograms(
"Net.DailyContentPercent_DataReductionProxyEnabled_ShortBypass", "Net.DailyContentPercent_DataReductionProxyEnabled_ShortBypass",
((100 * short_bypass_length_with_data_reduction_enabled) / ((100 * short_bypass_length_with_data_reduction_enabled) /
received_length)); received_length));
}
if (long_bypass_length_with_data_reduction_enabled > 0) { DCHECK_GE(long_bypass_length_with_data_reduction_enabled, 0);
UMA_HISTOGRAM_COUNTS( UMA_HISTOGRAM_COUNTS(
"Net.DailyContentLength_DataReductionProxyEnabled_LongBypass", "Net.DailyContentLength_DataReductionProxyEnabled_LongBypass",
long_bypass_length_with_data_reduction_enabled >> 10); long_bypass_length_with_data_reduction_enabled >> 10);
...@@ -139,9 +137,8 @@ void RecordDailyContentLengthHistograms( ...@@ -139,9 +137,8 @@ void RecordDailyContentLengthHistograms(
"Net.DailyContentPercent_DataReductionProxyEnabled_LongBypass", "Net.DailyContentPercent_DataReductionProxyEnabled_LongBypass",
((100 * long_bypass_length_with_data_reduction_enabled) / ((100 * long_bypass_length_with_data_reduction_enabled) /
received_length)); received_length));
}
if (unknown_length_with_data_reduction_enabled > 0) { DCHECK_GE(unknown_length_with_data_reduction_enabled, 0);
UMA_HISTOGRAM_COUNTS( UMA_HISTOGRAM_COUNTS(
"Net.DailyContentLength_DataReductionProxyEnabled_Unknown", "Net.DailyContentLength_DataReductionProxyEnabled_Unknown",
unknown_length_with_data_reduction_enabled >> 10); unknown_length_with_data_reduction_enabled >> 10);
...@@ -149,16 +146,12 @@ void RecordDailyContentLengthHistograms( ...@@ -149,16 +146,12 @@ void RecordDailyContentLengthHistograms(
"Net.DailyContentPercent_DataReductionProxyEnabled_Unknown", "Net.DailyContentPercent_DataReductionProxyEnabled_Unknown",
((100 * unknown_length_with_data_reduction_enabled) / ((100 * unknown_length_with_data_reduction_enabled) /
received_length)); received_length));
}
if (original_length_via_data_reduction_proxy <= 0 ||
received_length_via_data_reduction_proxy <= 0) {
return;
}
DCHECK_GE(original_length_via_data_reduction_proxy, 0);
UMA_HISTOGRAM_COUNTS( UMA_HISTOGRAM_COUNTS(
"Net.DailyOriginalContentLength_ViaDataReductionProxy", "Net.DailyOriginalContentLength_ViaDataReductionProxy",
original_length_via_data_reduction_proxy >> 10); original_length_via_data_reduction_proxy >> 10);
DCHECK_GE(received_length_via_data_reduction_proxy, 0);
UMA_HISTOGRAM_COUNTS( UMA_HISTOGRAM_COUNTS(
"Net.DailyContentLength_ViaDataReductionProxy", "Net.DailyContentLength_ViaDataReductionProxy",
received_length_via_data_reduction_proxy >> 10); received_length_via_data_reduction_proxy >> 10);
......
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