DescriptionAdd histograms presubmit check for UseCounter.h
The UMA mapping in tools/metrics/histograms/histograms.xml should be updated
whenever a new entry is added to the UseCounter::Feature enum. A script already
exists to automatically update this mapping
(tools/metrics/histograms/update_use_counter_feature_enum.py).
This patch extends the script's library to include a function that checks whether
running the script would produce a change. The patch also implements a presubmit
check that runs this function when UseCounter.h has been modified, and outputs a
warning if a change is detected.
BUG=
Committed: https://crrev.com/3240362085e84fcb32d09866c965b914d7fe0528
Cr-Commit-Position: refs/heads/master@{#378902}
Patch Set 1 #Patch Set 2 : Added dummy UseCounter, fixed implementation bug #Patch Set 3 : Tweaked warning message, removed dummy UseCounter #
Total comments: 3
Patch Set 4 : Refactor; add dummy UseCounter for testing #Patch Set 5 : Re-remove dummy UseCounter #
Total comments: 8
Patch Set 6 : Added comment, moved constant to file-level #Patch Set 7 : Added dummy UseCounter for testing #Patch Set 8 : Remove dummy UseCounter #
Total comments: 2
Patch Set 9 : Style fix #
Messages
Total messages: 20 (6 generated)
|