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

Side by Side Diff: tools/metrics/rappor/pretty_print.py

Issue 1143323006: Histograms.xml python script housekeeping (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bad_message
Patch Set: Small whitespace adjustment 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 2015 The Chromium Authors. All rights reserved. 2 # Copyright 2015 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 import logging 6 import logging
7 import os
7 import sys 8 import sys
8 import os
9 9
10 # Import the metrics/common module for pretty print xml. 10 sys.path.append(os.path.join(os.path.dirname(__file__), '..')) # tools/metrics
11 sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'common')) 11 from common import models
12 import models 12 from common import presubmit_util
13 import presubmit_util
14 13
15 14
16 # Model definitions for rappor.xml content 15 # Model definitions for rappor.xml content
17 _SUMMARY_TYPE = models.TextNodeType('summary') 16 _SUMMARY_TYPE = models.TextNodeType('summary')
18 17
19 _PARAMETERS_TYPE = models.ObjectNodeType('parameters', 18 _PARAMETERS_TYPE = models.ObjectNodeType('parameters',
20 int_attributes=[ 19 int_attributes=[
21 'num-cohorts', 20 'num-cohorts',
22 'bytes', 21 'bytes',
23 'hash-functions', 22 'hash-functions',
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 return RAPPOR_XML_TYPE.PrettyPrint(comments, config) 175 return RAPPOR_XML_TYPE.PrettyPrint(comments, config)
177 176
178 177
179 def main(argv): 178 def main(argv):
180 presubmit_util.DoPresubmitMain(argv, 'rappor.xml', 'rappor.old.xml', 179 presubmit_util.DoPresubmitMain(argv, 'rappor.xml', 'rappor.old.xml',
181 'pretty_print.py', UpdateXML) 180 'pretty_print.py', UpdateXML)
182 181
183 182
184 if '__main__' == __name__: 183 if '__main__' == __name__:
185 sys.exit(main(sys.argv)) 184 sys.exit(main(sys.argv))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698