Commit 20bfa4c0 authored by Brian White's avatar Brian White Committed by Commit Bot

Support multiple index lines for UKM aggregation.

Bug: 948136
Change-Id: I23efb918e6467cae511fc53b0c8058f34ee6862c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1546879
Commit-Queue: Brian White <bcwhite@chromium.org>
Reviewed-by: default avatarRobert Kaplow <rkaplow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#646501}
parent 02d811ec
...@@ -39,23 +39,23 @@ _STATISTICS_TYPE = models.ObjectNodeType( ...@@ -39,23 +39,23 @@ _STATISTICS_TYPE = models.ObjectNodeType(
'statistics', 'statistics',
attributes=[], attributes=[],
children=[ children=[
models.ChildType('quantiles', _QUANTILES_TYPE, False), models.ChildType('quantiles', _QUANTILES_TYPE, multiple=False),
models.ChildType('enumeration', _ENUMERATION_TYPE, False), models.ChildType('enumeration', _ENUMERATION_TYPE, multiple=False),
]) ])
_HISTORY_TYPE = models.ObjectNodeType( _HISTORY_TYPE = models.ObjectNodeType(
'history', 'history',
attributes=[], attributes=[],
children=[ children=[
models.ChildType('index', _INDEX_TYPE, False), models.ChildType('index', _INDEX_TYPE, multiple=True),
models.ChildType('statistics', _STATISTICS_TYPE, True), models.ChildType('statistics', _STATISTICS_TYPE, multiple=True),
]) ])
_AGGREGATION_TYPE = models.ObjectNodeType( _AGGREGATION_TYPE = models.ObjectNodeType(
'aggregation', 'aggregation',
attributes=[], attributes=[],
children=[ children=[
models.ChildType('history', _HISTORY_TYPE, False), models.ChildType('history', _HISTORY_TYPE, multiple=False),
]) ])
_METRIC_TYPE = models.ObjectNodeType( _METRIC_TYPE = models.ObjectNodeType(
...@@ -65,10 +65,10 @@ _METRIC_TYPE = models.ObjectNodeType( ...@@ -65,10 +65,10 @@ _METRIC_TYPE = models.ObjectNodeType(
('semantic_type', unicode, None), ('semantic_type', unicode, None),
], ],
children=[ children=[
models.ChildType('obsolete', _OBSOLETE_TYPE, False), models.ChildType('obsolete', _OBSOLETE_TYPE, multiple=False),
models.ChildType('owners', _OWNER_TYPE, True), models.ChildType('owners', _OWNER_TYPE, multiple=True),
models.ChildType('summary', _SUMMARY_TYPE, False), models.ChildType('summary', _SUMMARY_TYPE, multiple=False),
models.ChildType('aggregation', _AGGREGATION_TYPE, True), models.ChildType('aggregation', _AGGREGATION_TYPE, multiple=True),
]) ])
_EVENT_TYPE = models.ObjectNodeType( _EVENT_TYPE = models.ObjectNodeType(
...@@ -79,10 +79,10 @@ _EVENT_TYPE = models.ObjectNodeType( ...@@ -79,10 +79,10 @@ _EVENT_TYPE = models.ObjectNodeType(
('singular', bool, None)], ('singular', bool, None)],
extra_newlines=(1, 1, 1), extra_newlines=(1, 1, 1),
children=[ children=[
models.ChildType('obsolete', _OBSOLETE_TYPE, False), models.ChildType('obsolete', _OBSOLETE_TYPE, multiple=False),
models.ChildType('owners', _OWNER_TYPE, True), models.ChildType('owners', _OWNER_TYPE, multiple=True),
models.ChildType('summary', _SUMMARY_TYPE, False), models.ChildType('summary', _SUMMARY_TYPE, multiple=False),
models.ChildType('metrics', _METRIC_TYPE, True), models.ChildType('metrics', _METRIC_TYPE, multiple=True),
]) ])
_UKM_CONFIGURATION_TYPE = models.ObjectNodeType( _UKM_CONFIGURATION_TYPE = models.ObjectNodeType(
...@@ -90,7 +90,7 @@ _UKM_CONFIGURATION_TYPE = models.ObjectNodeType( ...@@ -90,7 +90,7 @@ _UKM_CONFIGURATION_TYPE = models.ObjectNodeType(
extra_newlines=(2, 1, 1), extra_newlines=(2, 1, 1),
indent=False, indent=False,
children=[ children=[
models.ChildType('events', _EVENT_TYPE, True), models.ChildType('events', _EVENT_TYPE, multiple=True),
]) ])
UKM_XML_TYPE = models.DocumentType(_UKM_CONFIGURATION_TYPE) UKM_XML_TYPE = models.DocumentType(_UKM_CONFIGURATION_TYPE)
......
...@@ -15,6 +15,7 @@ PRETTY_XML = """ ...@@ -15,6 +15,7 @@ PRETTY_XML = """
<event name="Event1"> <event name="Event1">
<owner>owner@chromium.org</owner> <owner>owner@chromium.org</owner>
<owner>anotherowner@chromium.org</owner>
<summary> <summary>
Event1 summary. Event1 summary.
</summary> </summary>
...@@ -23,6 +24,15 @@ PRETTY_XML = """ ...@@ -23,6 +24,15 @@ PRETTY_XML = """
<summary> <summary>
Metric1 summary. Metric1 summary.
</summary> </summary>
<aggregation>
<history>
<index fields="profile.country"/>
<index fields="profile.form_factor"/>
<statistics>
<quantiles type="std-percentiles"/>
</statistics>
</history>
</aggregation>
</metric> </metric>
<metric name="Metric2"/> <metric name="Metric2"/>
</event> </event>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment