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

Unified Diff: base/metrics/histogram_macros.h

Issue 1638013002: Add UMA histograms to track very brief or frequent tabs and JS dialogs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
Index: base/metrics/histogram_macros.h
diff --git a/base/metrics/histogram_macros.h b/base/metrics/histogram_macros.h
index 72f7d86167a58ece3497f86c8c9d0eec73475650..5ef1690b89c90dd7def96fa037b52c5d0aa225c4 100644
--- a/base/metrics/histogram_macros.h
+++ b/base/metrics/histogram_macros.h
@@ -182,6 +182,12 @@
name, sample, base::TimeDelta::FromMilliseconds(1), \
base::TimeDelta::FromHours(1), 100)
+// Use this macro to capture fine-grained timing variations from a millisecond
+// up to a minute, using 100 buckets.
Ilya Sherman 2016/01/26 22:39:04 This description says that the lower bound is a mi
Joe Mason 2016/01/27 16:51:21 There's a design doc for this feature at https://d
+#define UMA_HISTOGRAM_FINE_TIMES_100(name, sample) UMA_HISTOGRAM_CUSTOM_TIMES( \
+ name, sample, base::TimeDelta::FromMicroseconds(100), \
+ base::TimeDelta::FromMinutes(1), 100)
Ilya Sherman 2016/01/26 22:39:04 I'm not sure that it makes sense to add this macro
Joe Mason 2016/01/27 16:51:21 Yeah, it's a judgement call - I thought it was a g
Ilya Sherman 2016/01/28 05:25:26 You could also define a macro in the component, an
+
#define UMA_HISTOGRAM_CUSTOM_TIMES(name, sample, min, max, bucket_count) \
STATIC_HISTOGRAM_POINTER_BLOCK(name, AddTime(sample), \
base::Histogram::FactoryTimeGet(name, min, max, bucket_count, \

Powered by Google App Engine
This is Rietveld 408576698