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

Unified Diff: tools/metrics/histograms/extract_histograms.py

Issue 2890013004: Clean up histograms.xml formatting
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
Index: tools/metrics/histograms/extract_histograms.py
diff --git a/tools/metrics/histograms/extract_histograms.py b/tools/metrics/histograms/extract_histograms.py
index c36334a7ee8ae765a82d23a6c8fa33ab0deda10f..6932bea3df48bb72658d6b2e7d1d1c496dacdd79 100644
--- a/tools/metrics/histograms/extract_histograms.py
+++ b/tools/metrics/histograms/extract_histograms.py
@@ -39,16 +39,16 @@ XML below will generate the following five histograms:
</enums>
-<histogram_suffixes_list>
+<histogram-suffixes-list>
-<histogram_suffixes name="BrowserType">
+<histogram-suffixes name="BrowserType">
<suffix name="Chrome"/>
<suffix name="IE"/>
<suffix name="Firefox"/>
<affected-histogram name="HistogramEnum"/>
-</histogram_suffixes>
+</histogram-suffixes>
-</histogram_suffixes_list>
+</histogram-suffixes-list>
</histogram-configuration>
@@ -184,11 +184,6 @@ def _ExtractEnumsFromXmlTree(tree):
last_name = None
for enum in tree.getElementsByTagName('enum'):
- if enum.getAttribute('type') != 'int':
- logging.error('Unknown enum type %s', enum.getAttribute('type'))
- have_errors = True
- continue
-
name = enum.getAttribute('name')
if last_name is not None and name.lower() < last_name.lower():
logging.error('Enums %s and %s are not in alphabetical order',

Powered by Google App Engine
This is Rietveld 408576698