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

Unified Diff: webkit/browser/appcache/appcache_histograms.cc

Issue 207163002: more uma stats (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | « webkit/browser/appcache/appcache_histograms.h ('k') | webkit/browser/appcache/appcache_request_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/browser/appcache/appcache_histograms.cc
diff --git a/webkit/browser/appcache/appcache_histograms.cc b/webkit/browser/appcache/appcache_histograms.cc
index 0ee25c25741a44e0dd364d08f6a767dff5945bdd..b7299e658f378cc2aae075fafe2cad8e34192ea8 100644
--- a/webkit/browser/appcache/appcache_histograms.cc
+++ b/webkit/browser/appcache/appcache_histograms.cc
@@ -53,6 +53,58 @@ void AppCacheHistograms::CountCheckResponseResult(
result, NUM_CHECK_RESPONSE_RESULT_TYPES);
}
+void AppCacheHistograms::CountResponseRetrieval(
+ bool success, bool is_main_resource, const GURL& origin_url) {
+ std::string label;
+ if (is_main_resource) {
+ label = "appcache.MainResourceResponseRetrieval";
+ UMA_HISTOGRAM_BOOLEAN(label, success);
+ } else {
+ label = "appcache.SubResourceResponseRetrieval";
+ UMA_HISTOGRAM_BOOLEAN(label, success);
+ }
+ const std::string suffix = OriginToCustomHistogramSuffix(origin_url);
+ if (!suffix.empty()) {
+ base::BooleanHistogram::FactoryGet(
+ label + suffix,
+ base::HistogramBase::kUmaTargetedHistogramFlag)->Add(success);
+ }
+}
+
+void AppCacheHistograms::LogUpdateFailureStats(
+ const GURL& origin_url,
+ int percent_complete,
+ bool was_stalled,
+ bool was_off_origin_resource_failure) {
+ const std::string suffix = OriginToCustomHistogramSuffix(origin_url);
+
+ std::string label = "appcache.UpdateProgressAtPointOfFaliure";
+ UMA_HISTOGRAM_PERCENTAGE(label, percent_complete);
+ if (!suffix.empty()) {
+ base::LinearHistogram::FactoryGet(
+ label + suffix,
+ 1, 101, 102,
+ base::HistogramBase::kUmaTargetedHistogramFlag)->Add(percent_complete);
+ }
+
+ label = "appcache.UpdateWasStalledAtPointOfFailure";
+ UMA_HISTOGRAM_BOOLEAN(label, was_stalled);
+ if (!suffix.empty()) {
+ base::BooleanHistogram::FactoryGet(
+ label + suffix,
+ base::HistogramBase::kUmaTargetedHistogramFlag)->Add(was_stalled);
+ }
+
+ label = "appcache.UpdateWasOffOriginAtPointOfFailure";
+ UMA_HISTOGRAM_BOOLEAN(label, was_off_origin_resource_failure);
+ if (!suffix.empty()) {
+ base::BooleanHistogram::FactoryGet(
+ label + suffix,
+ base::HistogramBase::kUmaTargetedHistogramFlag)->Add(
+ was_off_origin_resource_failure);
+ }
+}
+
void AppCacheHistograms::AddTaskQueueTimeSample(
const base::TimeDelta& duration) {
UMA_HISTOGRAM_TIMES("appcache.TaskQueueTime", duration);
« no previous file with comments | « webkit/browser/appcache/appcache_histograms.h ('k') | webkit/browser/appcache/appcache_request_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698