tools/metrics/ukm/xml_validations.py
def _getIndexFields(metric_node):
  """Get a list of fields from index node descendents of a metric_node."""
  aggregation_nodes = metric_node.getElementsByTagName('aggregation')
  if not aggregation_nodes:
    return []

  history_nodes = aggregation_nodes[0].getElementsByTagName('history')
  if not history_nodes:
    return []

  index_nodes = history_nodes[0].getElementsByTagName('index')
  if not index_nodes:
    return []

  return [index_node.getAttribute('fields') for index_node in index_nodes]
Get a list of fields from index node descendents of a metric_node.
Get a list of fields from index node descendents of a metric_node.
Get a list of fields from index node descendents of a metric_node .
def _getIndexFields(metric_node):
  aggregation_nodes = metric_node.getElementsByTagName('aggregation')
  if not aggregation_nodes:
    return []
  history_nodes = aggregation_nodes[0].getElementsByTagName('history')
  if not history_nodes:
    return []
  index_nodes = history_nodes[0].getElementsByTagName('index')
  if not index_nodes:
    return []
  return [index_node.getAttribute('fields') for index_node in index_nodes]
def _getIndexFields ( metric_node ) : aggregation_nodes = metric_node . getElementsByTagName ( 'aggregation' ) if not aggregation_nodes : return [ ] history_nodes = aggregation_nodes [ 0 ] . getElementsByTagName ( 'history' ) if not history_nodes : return [ ] index_nodes = history_nodes [ 0 ] . getElementsByTagName ( 'index' ) if not index_nodes : return [ ] return [ index_node . getAttribute ( 'fields' ) for index_node in index_nodes ]
Get a list of fields from index node descendents of a metric_node.
Get a list of fields from index node descendents of a metric_node .
"""Get a list of fields from index node descendents of a metric_node."""
metric_node