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

Unified Diff: tools/metrics/rappor/pretty_print.py

Issue 1058333002: Multi-dimension rappor metrics (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup and add xml support Created 5 years, 8 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 | « tools/metrics/common/models.py ('k') | tools/metrics/rappor/pretty_print_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/metrics/rappor/pretty_print.py
diff --git a/tools/metrics/rappor/pretty_print.py b/tools/metrics/rappor/pretty_print.py
index 7430479acf4713d65548434d140c6d0acbc13c34..35e850f54bb07c14f87a7593505b879c03c526fe 100755
--- a/tools/metrics/rappor/pretty_print.py
+++ b/tools/metrics/rappor/pretty_print.py
@@ -51,7 +51,7 @@ _OWNER_TYPE = models.TextNodeType('owner', single_line=True)
_RAPPOR_METRIC_TYPE = models.ObjectNodeType('rappor-metric',
extra_newlines=(1, 1, 1),
- string_attributes=['name', 'type'],
+ string_attributes=['name', 'type', 'flags'],
children=[
models.ChildType('owners', _OWNER_TYPE, True),
models.ChildType('summary', _SUMMARY_TYPE, False),
@@ -64,11 +64,31 @@ _RAPPOR_METRICS_TYPE = models.ObjectNodeType('rappor-metrics',
models.ChildType('metrics', _RAPPOR_METRIC_TYPE, True),
])
+_FLAG_TYPE = models.ObjectNodeType('flag',
+ extra_newlines=(1, 1, 0),
+ string_attributes=['name', 'description'])
+
+_FLAG_SET_TYPE = models.ObjectNodeType('flag-set',
+ extra_newlines=(1, 1, 1),
+ string_attributes=['name'],
+ children=[
+ models.ChildType('flags', _FLAG_TYPE, True),
+ ])
+
+_FLAG_SETS_TYPE = models.ObjectNodeType('flag-sets',
+ extra_newlines=(1, 1, 1),
+ dont_indent=True,
+ children=[
+ models.ChildType('flagSets', _FLAG_SET_TYPE, True),
+ ]
+)
+
_RAPPOR_CONFIGURATION_TYPE = models.ObjectNodeType('rappor-configuration',
extra_newlines=(1, 1, 1),
dont_indent=True,
children=[
models.ChildType('parameterTypes', _RAPPOR_PARAMETERS_TYPES_TYPE, False),
+ models.ChildType('flagSets', _FLAG_SETS_TYPE, True),
models.ChildType('metrics', _RAPPOR_METRICS_TYPE, False),
])
« no previous file with comments | « tools/metrics/common/models.py ('k') | tools/metrics/rappor/pretty_print_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698