parameters: (graph_names, suite_units, iter_output)
return_statement: return reduce(lambda r, t: r + t, traces.itervalues(), Results())
docstring: Iterates over the output of multiple benchmark reruns and accumulates
    generic results.
  
    Args:
      graph_names: List of names that configure the base path of the traces. E.g.
                   ['v8', 'Octane'].
      suite_units: Measurement default units as defined by the benchmark suite.
      iter_output: Iterator over the standard output of each test run.
    Returns: A "Results" object.
docstring_summary: Iterates over the output of multiple benchmark reruns and accumulates
    generic results.
docstring_tokens: Iterates over the output of multiple benchmark reruns and accumulates generic results .
function: def AccumulateGenericResults(graph_names, suite_units, iter_output):
    """Iterates over the output of multiple benchmark reruns and accumulates
    generic results.
  
    Args:
      graph_names: List of names that configure the base path of the traces. E.g.
                   ['v8', 'Octane'].
      suite_units: Measurement default units as defined by the benchmark suite.
      iter_output: Iterator over the standard output of each test run.
    Returns: A "Results" object.
    """
    traces = OrderedDict()
    for stdout in iter_output():
      if stdout is None:
        # The None value is used as a null object to simplify logic.
        continue
      for line in stdout.strip().splitlines():
        match = GENERIC_RESULTS_RE.match(line)
        if match:
          stddev = ""
          graph = match.group(1)
          trace = match.group(2)
          body = match.group(3)
          units = match.group(4)
          match_stddev = RESULT_STDDEV_RE.match(body)
          match_list = RESULT_LIST_RE.match(body)
          errors = []
          if match_stddev:
            result, stddev = map(str.strip, match_stddev.group(1).split(","))
            results = [result]
          elif match_list:
            results = map(str.strip, match_list.group(1).split(","))
          else:
            results = [body.strip()]
  
          try:
            results = map(lambda r: str(float(r)), results)
          except ValueError:
            results = []
            errors = ["Found non-numeric in %s" %
                      "/".join(graph_names + [graph, trace])]
  
          trace_result = traces.setdefault(trace, Results([{
            "graphs": graph_names + [graph, trace],
            "units": (units or suite_units).strip(),
            "results": [],
            "stddev": "",
          }], errors))
          trace_result.traces[0]["results"].extend(results)
          trace_result.traces[0]["stddev"] = stddev
  
    return reduce(lambda r, t: r + t, traces.itervalues(), Results())
function_tokens: def AccumulateGenericResults ( graph_names , suite_units , iter_output ) : traces = OrderedDict ( ) for stdout in iter_output ( ) : if stdout is None : # The None value is used as a null object to simplify logic. continue for line in stdout . strip ( ) . splitlines ( ) : match = GENERIC_RESULTS_RE . match ( line ) if match : stddev = "" graph = match . group ( 1 ) trace = match . group ( 2 ) body = match . group ( 3 ) units = match . group ( 4 ) match_stddev = RESULT_STDDEV_RE . match ( body ) match_list = RESULT_LIST_RE . match ( body ) errors = [ ] if match_stddev : result , stddev = map ( str . strip , match_stddev . group ( 1 ) . split ( "," ) ) results = [ result ] elif match_list : results = map ( str . strip , match_list . group ( 1 ) . split ( "," ) ) else : results = [ body . strip ( ) ] try : results = map ( lambda r : str ( float ( r ) ) , results ) except ValueError : results = [ ] errors = [ "Found non-numeric in %s" % "/" . join ( graph_names + [ graph , trace ] ) ] trace_result = traces . setdefault ( trace , Results ( [ { "graphs" : graph_names + [ graph , trace ] , "units" : ( units or suite_units ) . strip ( ) , "results" : [ ] , "stddev" : "" , } ] , errors ) ) trace_result . traces [ 0 ] [ "results" ] . extend ( results ) trace_result . traces [ 0 ] [ "stddev" ] = stddev return reduce ( lambda r , t : r + t , traces . itervalues ( ) , Results ( ) )