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

Unified Diff: base/metrics/histogram_macros.h

Issue 2831543002: [UMA] Expand the comment for UMA_HISTOGRAM_SPARSE_SLOWLY (Closed)
Patch Set: Created 3 years, 8 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: base/metrics/histogram_macros.h
diff --git a/base/metrics/histogram_macros.h b/base/metrics/histogram_macros.h
index d39972a8a12abde3b9a3159fe76c76f456de5580..7464cb722495a8d65b19f9092da3ced3f6194e3c 100644
--- a/base/metrics/histogram_macros.h
+++ b/base/metrics/histogram_macros.h
@@ -247,7 +247,12 @@
//
// UMA_HISTOGRAM_SPARSE_SLOWLY is good for sparsely distributed and/or
// infrequently recorded values since the implementation is slower
-// and takes more memory.
+// and takes more memory. For sparse data, sparse histograms have the advantage
+// of using less memory client-side, because they allocate buckets on demand
+// rather than preallocating. However, server-side, we still need to load all
+// buckets, across all users, at once. Thus, please avoid exploding such
+// histograms, i.e. uploading many many distinct values to the server (across
jkrcal 2017/04/19 07:58:06 Maybe we can make the "many many" more concrete. R
Ilya Sherman 2017/04/19 17:22:07 <= 100 is best, and <= 1000 is okay (but more expe
jkrcal 2017/04/26 07:39:14 Done.
+// all users).
//
// For instance, Sqlite.Version.* are sparse because for any given database,
// there's going to be exactly one version logged.
« 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