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

Unified Diff: chrome/browser/prerender/prerender_util.cc

Issue 17322003: Update the mod_pagespeed histogram to be a sparse histogram. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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: chrome/browser/prerender/prerender_util.cc
diff --git a/chrome/browser/prerender/prerender_util.cc b/chrome/browser/prerender/prerender_util.cc
index 6a4dc49d94fc48529e2165e810235ff7bdd64776..60ffd57a68f452195063ad68f285544f2b4f4274 100644
--- a/chrome/browser/prerender/prerender_util.cc
+++ b/chrome/browser/prerender/prerender_util.cc
@@ -5,7 +5,7 @@
#include "chrome/browser/prerender/prerender_util.h"
#include "base/logging.h"
-#include "base/metrics/histogram.h"
+#include "base/metrics/sparse_histogram.h"
#include "base/strings/string_util.h"
#include "content/public/browser/resource_request_info.h"
#include "googleurl/src/url_canon.h"
@@ -101,10 +101,10 @@ void URLRequestResponseStarted(net::URLRequest* request) {
// Gather histogram information about the X-Mod-Pagespeed header.
if (info->GetResourceType() == ResourceType::MAIN_FRAME &&
IsWebURL(request->url())) {
- UMA_HISTOGRAM_ENUMERATION(kModPagespeedHistogram, 0, 101);
+ UMA_HISTOGRAM_SPARSE_SLOWLY(kModPagespeedHistogram, 0);
if (request->response_headers() &&
request->response_headers()->HasHeader(kModPagespeedHeader)) {
- UMA_HISTOGRAM_ENUMERATION(kModPagespeedHistogram, 1, 101);
+ UMA_HISTOGRAM_SPARSE_SLOWLY(kModPagespeedHistogram, 1);
// Attempt to parse the version number, and encode it in buckets
// 2 through 99. 0 and 1 are used to store all pageviews and
@@ -126,7 +126,7 @@ void URLRequestResponseStarted(net::URLRequest* request) {
output++;
if (output < 2 || output >= 99)
output = 99;
- UMA_HISTOGRAM_ENUMERATION(kModPagespeedHistogram, output, 101);
+ UMA_HISTOGRAM_SPARSE_SLOWLY(kModPagespeedHistogram, output);
}
}
}
« 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