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

Side by Side Diff: tools/metrics/histograms/validate_format.py

Issue 1143323006: Histograms.xml python script housekeeping (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bad_message
Patch Set: Fix imports (sadface) Created 5 years, 6 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 unified diff | Download patch
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2013 The Chromium Authors. All rights reserved. 2 # Copyright 2013 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Verifies that the histograms XML file is well-formatted.""" 6 """Verifies that the histograms XML file is well-formatted."""
7 7
8 import os
9 import sys
10
11 sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'common'))
12 import path_util
13
8 import extract_histograms 14 import extract_histograms
9 import os.path
10
11 15
12 def main(): 16 def main():
13 # This will raise an exception if the file is not well-formatted. 17 # This will raise an exception if the file is not well-formatted.
14 xml_file = os.path.join(os.path.dirname(os.path.realpath(__file__)), 18 xml_file = path_util.GetHistogramsFile()
15 'histograms.xml')
16 histograms = extract_histograms.ExtractHistograms(xml_file) 19 histograms = extract_histograms.ExtractHistograms(xml_file)
17 20
18 21
19 if __name__ == '__main__': 22 if __name__ == '__main__':
20 main() 23 main()
21 24
OLDNEW
« no previous file with comments | « tools/metrics/histograms/update_use_counter_feature_enum.py ('k') | tools/metrics/rappor/pretty_print.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698