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(
'statistics',
attributes=[],
children=[
models.ChildType('quantiles', _QUANTILES_TYPE, False),
models.ChildType('enumeration', _ENUMERATION_TYPE, False),
models.ChildType('quantiles', _QUANTILES_TYPE, multiple=False),
models.ChildType('enumeration', _ENUMERATION_TYPE, multiple=False),
])
_HISTORY_TYPE = models.ObjectNodeType(
'history',
attributes=[],
children=[
models.ChildType('index', _INDEX_TYPE, False),
models.ChildType('statistics', _STATISTICS_TYPE, True),
models.ChildType('index', _INDEX_TYPE, multiple=True),
models.ChildType('statistics', _STATISTICS_TYPE, multiple=True),
])
_AGGREGATION_TYPE = models.ObjectNodeType(
'aggregation',
attributes=[],
children=[
models.ChildType('history', _HISTORY_TYPE, False),
models.ChildType('history', _HISTORY_TYPE, multiple=False),
])
_METRIC_TYPE = models.ObjectNodeType(
......@@ -65,10 +65,10 @@ _METRIC_TYPE = models.ObjectNodeType(
('semantic_type', unicode, None),
],
children=[
models.ChildType('obsolete', _OBSOLETE_TYPE, False),
models.ChildType('owners', _OWNER_TYPE, True),
models.ChildType('summary', _SUMMARY_TYPE, False),
models.ChildType('aggregation', _AGGREGATION_TYPE, True),
models.ChildType('obsolete', _OBSOLETE_TYPE, multiple=False),
models.ChildType('owners', _OWNER_TYPE, multiple=True),
models.ChildType('summary', _SUMMARY_TYPE, multiple=False),
models.ChildType('aggregation', _AGGREGATION_TYPE, multiple=True),
])
_EVENT_TYPE = models.ObjectNodeType(
......@@ -79,10 +79,10 @@ _EVENT_TYPE = models.ObjectNodeType(
('singular', bool, None)],
extra_newlines=(1, 1, 1),
children=[
models.ChildType('obsolete', _OBSOLETE_TYPE, False),
models.ChildType('owners', _OWNER_TYPE, True),
models.ChildType('summary', _SUMMARY_TYPE, False),
models.ChildType('metrics', _METRIC_TYPE, True),
models.ChildType('obsolete', _OBSOLETE_TYPE, multiple=False),
models.ChildType('owners', _OWNER_TYPE, multiple=True),
models.ChildType('summary', _SUMMARY_TYPE, multiple=False),
models.ChildType('metrics', _METRIC_TYPE, multiple=True),
])
_UKM_CONFIGURATION_TYPE = models.ObjectNodeType(
......@@ -90,7 +90,7 @@ _UKM_CONFIGURATION_TYPE = models.ObjectNodeType(
extra_newlines=(2, 1, 1),
indent=False,
children=[
models.ChildType('events', _EVENT_TYPE, True),
models.ChildType('events', _EVENT_TYPE, multiple=True),
])
UKM_XML_TYPE = models.DocumentType(_UKM_CONFIGURATION_TYPE)
......
......@@ -15,6 +15,7 @@ PRETTY_XML = """
<event name="Event1">
<owner>owner@chromium.org</owner>
<owner>anotherowner@chromium.org</owner>
<summary>
Event1 summary.
</summary>
......@@ -23,6 +24,15 @@ PRETTY_XML = """
<summary>
Metric1 summary.
</summary>
<aggregation>
<history>
<index fields="profile.country"/>
<index fields="profile.form_factor"/>
<statistics>
<quantiles type="std-percentiles"/>
</statistics>
</history>
</aggregation>
</metric>
<metric name="Metric2"/>
</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