tools/metrics/histograms/split_xml.py
def SplitIntoMultipleHistogramXMLs(output_base_dir):
  """Splits a large histograms.xml and writes out the split xmls.

  Args:
    output_base_dir: The output base directory.
  """
  if not os.path.exists(output_base_dir):
    os.mkdir(output_base_dir)

  histogram_nodes, variants_nodes, histogram_suffixes_nodes = _ParseMergedXML()

  # Create separate XML file for histogram suffixes.
  _CreateXMLFile('histogram suffixes', 'histogram_suffixes_list',
                 histogram_suffixes_nodes, output_base_dir,
                 'histogram_suffixes_list.xml')

  obsolete_nodes, non_obsolete_nodes = _SeparateObsoleteHistogram(
      histogram_nodes)
  # Create separate XML file for obsolete histograms.
  _CreateXMLFile('obsolete histograms', 'histograms', obsolete_nodes,
                 output_base_dir, 'obsolete_histograms.xml')

  document_dict = _BuildDocumentDict(non_obsolete_nodes + variants_nodes, 0)

  _WriteDocumentDict(document_dict, output_base_dir)
Splits a large histograms.xml and writes out the split xmls.

  Args:
    output_base_dir: The output base directory.
  
Splits a large histograms.xml and writes out the split xmls.
Splits a large histograms . xml and writes out the split xmls .
def SplitIntoMultipleHistogramXMLs(output_base_dir):
  if not os.path.exists(output_base_dir):
    os.mkdir(output_base_dir)
  histogram_nodes, variants_nodes, histogram_suffixes_nodes = _ParseMergedXML()
  _CreateXMLFile('histogram suffixes', 'histogram_suffixes_list',
                 histogram_suffixes_nodes, output_base_dir,
                 'histogram_suffixes_list.xml')
  obsolete_nodes, non_obsolete_nodes = _SeparateObsoleteHistogram(
      histogram_nodes)
  _CreateXMLFile('obsolete histograms', 'histograms', obsolete_nodes,
                 output_base_dir, 'obsolete_histograms.xml')
  document_dict = _BuildDocumentDict(non_obsolete_nodes + variants_nodes, 0)
  _WriteDocumentDict(document_dict, output_base_dir)
def SplitIntoMultipleHistogramXMLs ( output_base_dir ) : if not os . path . exists ( output_base_dir ) : os . mkdir ( output_base_dir ) histogram_nodes , variants_nodes , histogram_suffixes_nodes = _ParseMergedXML ( ) _CreateXMLFile ( 'histogram suffixes' , 'histogram_suffixes_list' , histogram_suffixes_nodes , output_base_dir , 'histogram_suffixes_list.xml' ) obsolete_nodes , non_obsolete_nodes = _SeparateObsoleteHistogram ( histogram_nodes ) _CreateXMLFile ( 'obsolete histograms' , 'histograms' , obsolete_nodes , output_base_dir , 'obsolete_histograms.xml' ) document_dict = _BuildDocumentDict ( non_obsolete_nodes + variants_nodes , 0 ) _WriteDocumentDict ( document_dict , output_base_dir )
Splits a large histograms.xml and writes out the split xmls.
Splits a large histograms . xml and writes out the split xmls .
"""Splits a large histograms.xml and writes out the split xmls.

  Args:
    output_base_dir: The output base directory.
  """ # Create separate XML file for histogram suffixes. # Create separate XML file for obsolete histograms.
output_base_dir
The output base directory.
The output base directory .