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

Unified Diff: tools/metrics/actions/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 | « no previous file | tools/metrics/histograms/README.md » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/metrics/actions/README.md
diff --git a/tools/metrics/actions/README.md b/tools/metrics/actions/README.md
index 9148a5b2fc7be7fe90e59cc2715a977823dfc677..43c95acd671230f5e40ad2e488554bb19a5e8cc5 100644
--- a/tools/metrics/actions/README.md
+++ b/tools/metrics/actions/README.md
@@ -56,7 +56,7 @@ attention-grabbing (as in the first example), is often not useful for analyzing
sequences of user actions. For example, don't emit
"ShowedSecureIconNextToOmnibox".
-### Testing
+## Testing
Test your user actions using *chrome://user-actions*. Make sure they're being
emitted when you expect and not emitted at other times.
@@ -70,11 +70,15 @@ Also, check that your new user action is not mostly redundant with other user
actions (see [advice above](#Do-Not-Emit-Redundantly)) and not emitted
excessively (see [advice above](#Do-Not-Emit-Excessively)).
-### Revising User Actions
+In addition to testing interactively, you can have unit tests check the number
+of times a user action was emitted. See [user_action_tester.h](https://cs.chromium.org/chromium/src/base/test/user_action_tester.h)
+for details.
-If you're changing the semantics of a user action (when it's emitted), make it
-into a new user action with a new name. Otherwise the dashboard will be mixing
-two different interpretations of the data and make no sense.
+## Revising User Actions
+
+When changing the semantics of a user action (when it's emitted), make it into
+a new user action with a new name. Otherwise the dashboard will be mixing two
+different interpretations of the data and make no sense.
## Documenting User Actions
« no previous file with comments | « no previous file | tools/metrics/histograms/README.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698