Commit df40170f authored by Yue Ru Sun's avatar Yue Ru Sun Committed by Commit Bot

Fix typos in UKM API doc

Change-Id: I2d5ad7fcf8cf9ee45ead9ee4d2e3ba56e93ec387
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1796644
Commit-Queue: Yue Ru Sun <yrsun@chromium.org>
Auto-Submit: Yue Ru Sun <yrsun@chromium.org>
Reviewed-by: default avatarJesse Doherty <jwd@chromium.org>
Cr-Commit-Position: refs/heads/master@{#695776}
parent a15df3b0
...@@ -10,7 +10,7 @@ Any events and metrics you collect need to be documented in [//tools/metrics/ukm ...@@ -10,7 +10,7 @@ Any events and metrics you collect need to be documented in [//tools/metrics/ukm
### Required Details ### Required Details
* Metric `owner`: This the email of someone who can answer questions about how this metric is recorded, what it means, and how it should be used. Can include multiple people. * Metric `owner`: the email of someone who can answer questions about how this metric is recorded, what it means, and how it should be used. Can include multiple people.
* A `summary` of the event about which you are recording details, including a description of when the event will be recorded. * A `summary` of the event about which you are recording details, including a description of when the event will be recorded.
* For each metric in the event: a `summary` of the data and what it means. * For each metric in the event: a `summary` of the data and what it means.
* The `enum` type if the metric is enumerated. The enum uses the [//tools/metrics/histograms/enums.xml](https://cs.chromium.org/chromium/src/tools/metrics/histograms/enums.xml) file for definitions. Note this is the same file for UMA histogram definitions so these can ideally be reused. * The `enum` type if the metric is enumerated. The enum uses the [//tools/metrics/histograms/enums.xml](https://cs.chromium.org/chromium/src/tools/metrics/histograms/enums.xml) file for definitions. Note this is the same file for UMA histogram definitions so these can ideally be reused.
...@@ -93,9 +93,10 @@ tag as above but including "metrics.OtherMetricName" in the fields list. There ...@@ -93,9 +93,10 @@ tag as above but including "metrics.OtherMetricName" in the fields list. There
is no event name included as the metric must always be in the same event. is no event name included as the metric must always be in the same event.
The metric to act as a key must also have `<aggregation>`, `<history>`, and The metric to act as a key must also have `<aggregation>`, `<history>`, and
`<statistics>` tags with a valid statistic (currently only `<enumeration>` is `<statistics>` tags with a valid statistic (currently only `<enumeration>`
supported). However, since generating statistics for this "key" metric isn't metrics are supported as keys). However, since generating statistics for this
likely to be useful on its own, add `export=False` to its `<statistics>` tag. "key" metric isn't likely to be useful on its own, add `export=False` to its
`<statistics>` tag.
```xml ```xml
<event name="Memory.Experimental"> <event name="Memory.Experimental">
...@@ -190,7 +191,7 @@ ukm::builders::MyEvent(source_id) ...@@ -190,7 +191,7 @@ ukm::builders::MyEvent(source_id)
### Get A ukm::SourceId ### Get A ukm::SourceId
UKM identifies navigations by their source ID and you'll need to associate and ID with your event in order to tie it to a main frame URL. Preferrably, get an existing ID for the navigation from another object. UKM identifies navigations by their source ID and you'll need to associate an ID with your event in order to tie it to a main frame URL. Preferably, get an existing ID for the navigation from another object.
The main method for doing this is by getting a navigation ID: The main method for doing this is by getting a navigation ID:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment