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

Unified Diff: tools/metrics/histograms/README.md

Issue 2866293002: Metrics Documentation - Add Instruction for How To Unit Test (Closed)
Patch Set: Created 3 years, 7 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 | « tools/metrics/actions/README.md ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/metrics/histograms/README.md
diff --git a/tools/metrics/histograms/README.md b/tools/metrics/histograms/README.md
index b645b2b8afcdec6839a443a46572e1f0d1f23cd2..f40799848549940ba592981bc857c2fef0e7ff0c 100644
--- a/tools/metrics/histograms/README.md
+++ b/tools/metrics/histograms/README.md
@@ -125,21 +125,25 @@ using the workaround of using an enum of length MxN, where you log each unique
pair {state, feature} as a separate entry in the same enum. If this causes a
large explosion in data (i.e. >100 enum entries), a [sparse histogram](#When-To-Use-Sparse-Histograms) may be appropriate. If you are unsure of the best way to proceed, please contact someone from the OWNERS file.
-### Testing
+## Testing
Test your histograms using `chrome://histograms`. Make sure they're being
emitted to when you expect and not emitted to at other times. Also check that
the values emitted to are correct. Finally, for count histograms, make sure
that buckets capture enough precision for your needs over the range.
-### Revising Histograms
+In addition to testing interactively, you can have unit tests examine the
+values emitted to histograms. See [histogram_tester.h](https://cs.chromium.org/chromium/src/base/test/histogram_tester.h)
+for details.
-If you're changing the semantics of a histogram (when it's emitted, what
-buckets mean, etc.), make it into a new histogram with a new name. Otherwise
-the "Everything" view on the dashboard will be mixing two different
+## Revising Histograms
+
+When changing the semantics of a histogram (when it's emitted, what buckets
+mean, etc.), make it into a new histogram with a new name. Otherwise the
+"Everything" view on the dashboard will be mixing two different
interpretations of the data and make no sense.
-### Deleting Histograms
+## Deleting Histograms
Please delete the code that emits to histograms that are no longer needed.
Histograms take up memory. Cleaning up histograms that you no longer care about
« no previous file with comments | « tools/metrics/actions/README.md ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698