Skip to content

Commit

Permalink
Correcting HasEverPlayed metric entry (#3171)
Browse files Browse the repository at this point in the history
Cobalt.Media.HasEverPlayed was correctly being logged as
base::UmaHistogramBoolean()
however, it was incorrectly using an enum for PipelineStatus.

This CL adds a new enum BooleanHasPlayed and sets
Cobalt.Media.HasEverPlayed to use it.
( I used a new enum rather than just the Boolean enum to follow
Chromium's example:

https://source.chromium.org/chromium/chromium/src/+/main:tools/metrics/histograms/metadata/media/histograms.xml;l=3891)

b/337308115
  • Loading branch information
sideb0ard committed May 7, 2024
1 parent a348ae2 commit 031665c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 5 additions & 0 deletions tools/metrics/histograms/metadata/cobalt/enums.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ https://chromium.googlesource.com/chromium/src.git/+/HEAD/tools/metrics/histogra
<int value="1" label="True"/>
</enum>

<enum name="BooleanHasPlayed">
<int value="0" label="Never played"/>
<int value="1" label="Played"/>
</enum>

<enum name="PipelineStatus">
<summary>
Possible status values reported by the Media Pipeline
Expand Down
5 changes: 2 additions & 3 deletions tools/metrics/histograms/metadata/cobalt/histograms.xml
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,14 @@ Always run the pretty print utility on this file after editing:
</summary>
</histogram>

<histogram name="Cobalt.Media.HasEverPlayed" enum="PipelineStatus"
<histogram name="Cobalt.Media.HasEverPlayed" enum="BooleanHasPlayed"
expires_after="never">
<!-- expires-never: Needed for baseline Media pipeline health metric. -->

<owner>[email protected]</owner>
<owner>[email protected]</owner>
<summary>
Status of the media pipeline at the end of its lifecycle for audio-video
streams with an unknown video codec.
Whether a given WebMediaPlayer instance, after preload, started playback;
</summary>
</histogram>

Expand Down

0 comments on commit 031665c

Please sign in to comment.