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

Unified Diff: tracing/bin/validate_all_metrics

Issue 2011403002: Rename all tbm2 metrics to start with lowercase & add PRESUBMIT (Closed) Base URL: https://github.com/catapult-project/catapult@master
Patch Set: Update SystemHealthMetric in other files Created 4 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 | tracing/tracing/metrics/system_health/efficiency_metric.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/bin/validate_all_metrics
diff --git a/tracing/bin/validate_all_metrics b/tracing/bin/validate_all_metrics
index 5cadeba2f59518c421d6398b80e382748d45040a..4711c5590f8778900f86182191c4cd72bdb0bbdf 100755
--- a/tracing/bin/validate_all_metrics
+++ b/tracing/bin/validate_all_metrics
@@ -6,6 +6,7 @@
import argparse
import json
import os
+import string
import sys
sys.path.insert(1, os.path.join(os.path.dirname(__file__), '..'))
@@ -26,8 +27,15 @@ def Main():
'tracing/tracing/metrics/all_metrics.html' %
', '.join(unregistered_metrics))
return 1
- else:
- return 0
+ uppercased_metrics = []
+ for m in all_possible_metrics:
+ if str.isupper(m[0]):
+ uppercased_metrics.append(m)
+ if uppercased_metrics:
+ print ('These metrics must be renamed to start with a lower-case: %s' %
+ uppercased_metrics)
+ return 1
+ return 0
if __name__ == '__main__':
sys.exit(Main())
« no previous file with comments | « no previous file | tracing/tracing/metrics/system_health/efficiency_metric.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698