tools/metrics/histograms/suffixes_to_variants.py
def _UpdateHistogramName(histogram, histogram_suffixes):
  """Adds histogram_suffixes's placeholder to the histogram name."""
  histogram_name = histogram.getAttribute('name')
  histogram_suffixes_name = histogram_suffixes.getAttribute('name')
  ordering = histogram_suffixes.getAttribute('ordering')
  if not ordering:
    histogram.setAttribute('name',
                           '%s{%s}' % (histogram_name, histogram_suffixes_name))
  else:
    parts = ordering.split(',')
    placement = 1
    if len(parts) > 1:
      placement = int(parts[1])
    sections = histogram_name.split('.')
    cluster = '.'.join(sections[0:placement]) + '.'
    reminder = '.'.join(sections[placement:])
    histogram.setAttribute(
        'name', '%s{%s}%s' % (cluster, histogram_suffixes_name, reminder))
Adds histogram_suffixes's placeholder to the histogram name.
Adds histogram_suffixes's placeholder to the histogram name.
Adds histogram_suffixes ' s placeholder to the histogram name .
def _UpdateHistogramName(histogram, histogram_suffixes):
  histogram_name = histogram.getAttribute('name')
  histogram_suffixes_name = histogram_suffixes.getAttribute('name')
  ordering = histogram_suffixes.getAttribute('ordering')
  if not ordering:
    histogram.setAttribute('name',
                           '%s{%s}' % (histogram_name, histogram_suffixes_name))
  else:
    parts = ordering.split(',')
    placement = 1
    if len(parts) > 1:
      placement = int(parts[1])
    sections = histogram_name.split('.')
    cluster = '.'.join(sections[0:placement]) + '.'
    reminder = '.'.join(sections[placement:])
    histogram.setAttribute(
        'name', '%s{%s}%s' % (cluster, histogram_suffixes_name, reminder))
def _UpdateHistogramName ( histogram , histogram_suffixes ) : histogram_name = histogram . getAttribute ( 'name' ) histogram_suffixes_name = histogram_suffixes . getAttribute ( 'name' ) ordering = histogram_suffixes . getAttribute ( 'ordering' ) if not ordering : histogram . setAttribute ( 'name' , '%s{%s}' % ( histogram_name , histogram_suffixes_name ) ) else : parts = ordering . split ( ',' ) placement = 1 if len ( parts ) > 1 : placement = int ( parts [ 1 ] ) sections = histogram_name . split ( '.' ) cluster = '.' . join ( sections [ 0 : placement ] ) + '.' reminder = '.' . join ( sections [ placement : ] ) histogram . setAttribute ( 'name' , '%s{%s}%s' % ( cluster , histogram_suffixes_name , reminder ) )
Adds histogram_suffixes's placeholder to the histogram name.
Adds histogram_suffixes ' s placeholder to the histogram name .
"""Adds histogram_suffixes's placeholder to the histogram name."""
histogram
histogram_suffixes