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

Unified Diff: content/browser/renderer_host/duplicate_content_resource_handler.cc

Issue 10829282: Added a histogram to track number of http/https resources. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/duplicate_content_resource_handler.cc
===================================================================
--- content/browser/renderer_host/duplicate_content_resource_handler.cc (revision 150428)
+++ content/browser/renderer_host/duplicate_content_resource_handler.cc (working copy)
@@ -92,6 +92,10 @@
MH_UINT32 contents_hash = PMurHash32_Result(pmurhash_ph1_,
pmurhash_pcarry_, bytes_read_);
+ bool is_http_or_https = request_->url().SchemeIs("http") ||
darin (slow to review) 2012/08/11 06:18:36 weren't you going to modify this to stop recording
+ request_->url().SchemeIs("https");
+ UMA_HISTOGRAM_BOOLEAN("Duplicate.IsHttpOrHttps", is_http_or_https);
+
// Combine the contents_hash with the url, so we can test if future content
// identical resources have the same original url or not.
MH_UINT32 hashed_with_url;
@@ -117,6 +121,8 @@
UMA_HISTOGRAM_BOOLEAN("Duplicate.Hits", did_match_contents);
UMA_HISTOGRAM_BOOLEAN("Duplicate.HitsSameUrl",
did_match_contents && did_match_contents_and_url);
+ UMA_HISTOGRAM_ENUMERATION("Duplicate.ResourceType.All", resource_type_,
darin (slow to review) 2012/08/11 06:18:36 this was part of the other CL, right?
+ ResourceType::LAST_TYPE);
if (did_match_contents && !did_match_contents_and_url) {
content_and_url_matches->insert(hashed_with_url);
UMA_HISTOGRAM_CUSTOM_COUNTS("Duplicate.Size.HashHitUrlMiss", bytes_read_,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698