Example #1
0
def ComputeTestPath(suite_path, hist):
    path = '%s/%s' % (suite_path, hist.name)

    # If a Histogram represents a summary across multiple stories, then its
    # 'stories' diagnostic will contain the names of all of the stories.
    # If a Histogram is not a summary, then its 'stories' diagnostic will contain
    # the singular name of its story.
    is_summary = list(
        hist.diagnostics.get(reserved_infos.SUMMARY_KEYS.name, []))

    tir_label = histogram_helpers.GetTIRLabelFromHistogram(hist)
    if tir_label and (not is_summary
                      or reserved_infos.STORY_TAGS.name in is_summary):
        path += '/' + tir_label

    is_ref = hist.diagnostics.get(reserved_infos.IS_REFERENCE_BUILD.name)
    if is_ref and len(is_ref) == 1:
        is_ref = is_ref.GetOnlyElement()

    story_name = hist.diagnostics.get(reserved_infos.STORIES.name)
    if story_name and len(story_name) == 1 and not is_summary:
        escaped_story_name = add_point.EscapeName(story_name.GetOnlyElement())
        path += '/' + escaped_story_name
        if is_ref:
            path += '_ref'
    elif is_ref:
        path += '/ref'

    return path
Example #2
0
def ComputeTestPath(suite_path, guid, histograms):
    hist = histograms.LookupHistogram(guid)
    path = '%s/%s' % (suite_path, hist.name)

    tir_label = histogram_helpers.GetTIRLabelFromHistogram(hist)
    if tir_label:
        path += '/' + tir_label

    is_ref = hist.diagnostics.get(reserved_infos.IS_REFERENCE_BUILD.name)
    if is_ref and len(is_ref) == 1:
        is_ref = list(is_ref)[0]

    # If a Histogram represents a summary across multiple stories, then its
    # 'stories' diagnostic will contain the names of all of the stories.
    # If a Histogram is not a summary, then its 'stories' diagnostic will contain
    # the singular name of its story.
    story_name = hist.diagnostics.get(reserved_infos.STORIES.name)
    if story_name and len(story_name) == 1:
        escaped_story_name = add_point.EscapeName(list(story_name)[0])
        path += '/' + escaped_story_name
        if is_ref:
            path += '_ref'
    elif is_ref:
        path += '/ref'

    return path
Example #3
0
def ComputeTestPath(guid, histograms):
  hist = histograms.LookupHistogram(guid)
  suite_path = '%s/%s/%s' % _GetMasterBotBenchmarkFromHistogram(hist)
  path = '%s/%s' % (suite_path, hist.name)

  story_name = hist.diagnostics.get(reserved_infos.STORIES.name)
  if story_name and len(story_name) == 1:
    escaped_story_name = add_point.EscapeName(list(story_name)[0])
    path += '/' + escaped_story_name

  return path