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

Unified Diff: components/data_reduction_proxy/browser/data_reduction_proxy_usage_stats.cc

Issue 447933002: DataReductionProxy.BypassedBytes.ShortAudioVideo UMA reports collateral damage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Histograms.xml revert name Created 6 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/data_reduction_proxy/browser/data_reduction_proxy_usage_stats.cc
diff --git a/components/data_reduction_proxy/browser/data_reduction_proxy_usage_stats.cc b/components/data_reduction_proxy/browser/data_reduction_proxy_usage_stats.cc
index d500301b25c7243dbc140fc831bdd17a5d24a6fb..19635b42189a4f750c5137cb5c75c346f9620247 100644
--- a/components/data_reduction_proxy/browser/data_reduction_proxy_usage_stats.cc
+++ b/components/data_reduction_proxy/browser/data_reduction_proxy_usage_stats.cc
@@ -139,17 +139,19 @@ void DataReductionProxyUsageStats::RecordBypassedBytesHistograms(
DataReductionProxyUsageStats::TRIGGERING_REQUEST,
content_length);
triggering_request_ = false;
- }
- std::string mime_type;
- request.GetMimeType(&mime_type);
- // MIME types are named by <media-type>/<subtype>. We check to see if the
- // media type is audio or video.
- if (mime_type.compare(0, 6, "audio/") == 0 ||
- mime_type.compare(0, 6, "video/") == 0) {
- RecordBypassedBytes(last_bypass_type_,
- DataReductionProxyUsageStats::AUDIO_VIDEO,
- content_length);
+ // We only record when audio or video triggers a bypass. We don't care
+ // about audio and video bypassed as collateral damage.
+ std::string mime_type;
+ request.GetMimeType(&mime_type);
+ // MIME types are named by <media-type>/<subtype>. We check to see if the
+ // media type is audio or video.
+ if (mime_type.compare(0, 6, "audio/") == 0 ||
+ mime_type.compare(0, 6, "video/") == 0) {
+ RecordBypassedBytes(last_bypass_type_,
+ DataReductionProxyUsageStats::AUDIO_VIDEO,
+ content_length);
+ }
}
if (last_bypass_type_ != ProxyService::BYPASS_EVENT_TYPE_MAX) {
@@ -191,7 +193,7 @@ void DataReductionProxyUsageStats::RecordBypassedBytes(
case DataReductionProxyUsageStats::AUDIO_VIDEO:
if (last_bypass_type_ == ProxyService::SHORT_BYPASS) {
UMA_HISTOGRAM_COUNTS(
- "DataReductionProxy.BypassedBytes.ShortAudioVideo",
+ "DataReductionProxy.BypassedBytes.ShortTriggeringRequestAudioVideo",
Alexei Svitkine (slow) 2014/08/12 14:32:37 Did you mean to not rename this?
megjablon 2014/08/12 16:53:59 Ah sorry didn't mean to send that message yet. I t
content_length);
}
break;
« 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