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

Unified Diff: metrics_library.h

Issue 2828017: Update libmetrics docs to cover some recent questions and issues. (Closed) Base URL: ssh://git@chromiumos-git/metrics.git
Patch Set: Created 10 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 | « README ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: metrics_library.h
diff --git a/metrics_library.h b/metrics_library.h
index 80bea70a38a468623f2a769faf8e5c79235fbced..76fa451ea7748f38041feae9698d51a2296dc768 100644
--- a/metrics_library.h
+++ b/metrics_library.h
@@ -38,6 +38,11 @@ class MetricsLibrary : public MetricsLibraryInterface {
// |nbuckets| is the number of histogram buckets.
// [0,min) is the implicit underflow bucket.
// [|max|,infinity) is the implicit overflow bucket.
+ //
+ // Note that the memory allocated in Chrome for each histogram is
+ // proportional to the number of buckets. Therefore, it is strongly
+ // recommended to keep this number low (e.g., 50 is normal, while
+ // 100 is high).
bool SendToUMA(const std::string& name, int sample,
int min, int max, int nbuckets);
@@ -50,6 +55,12 @@ class MetricsLibrary : public MetricsLibraryInterface {
// |max| is the maximum value of the histogram samples.
// 0 is the implicit underflow bucket.
// [|max|,infinity) is the implicit overflow bucket.
+ //
+ // An enumaration histogram requires |max| + 1 number of
+ // buckets. Note that the memory allocated in Chrome for each
+ // histogram is proportional to the number of buckets. Therefore, it
+ // is strongly recommended to keep this number low (e.g., 50 is
+ // normal, while 100 is high).
bool SendEnumToUMA(const std::string& name, int sample, int max);
// Sends to Autotest and returns true on success.
« no previous file with comments | « README ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698