tools/fuchsia/comparative_tester/generate_perf_report.py
def CompareTargets(linux: TargetStats, fuchsia: TargetStats) -> Dict[str, Any]:
  """Compare takes a corpus of statistics from both Fuchsia and Linux, and then
  lines up the values, compares them to each other, and writes them into a
  dictionary that can be JSONified.
  """
  if linux and fuchsia:
    assert linux.name == fuchsia.name
    paired_tests = ZipListsByPredicate(linux.tests, fuchsia.tests,
                                     lambda test: test.name)
    paired_tests = MapDictValues(paired_tests, CompareTests)
    return {"name": linux.name, "tests": paired_tests}
  else:
    # One of them has to be non-null, by the way ZipListsByPredicate functions
    assert linux or fuchsia
    if linux:
      logging.error("Fuchsia was missing test target {}".format(linux.name))
    else:
      logging.error("Linux was missing test target {}".format(fuchsia.name))
    return None
Compare takes a corpus of statistics from both Fuchsia and Linux, and then
  lines up the values, compares them to each other, and writes them into a
  dictionary that can be JSONified.
  
Compare takes a corpus of statistics from both Fuchsia and Linux, and then
lines up the values, compares them to each other, and writes them into a
dictionary that can be JSONified.
Compare takes a corpus of statistics from both Fuchsia and Linux and then lines up the values compares them to each other and writes them into a dictionary that can be JSONified .
def CompareTargets(linux: TargetStats, fuchsia: TargetStats) -> Dict[str, Any]:
  if linux and fuchsia:
    assert linux.name == fuchsia.name
    paired_tests = ZipListsByPredicate(linux.tests, fuchsia.tests,
                                     lambda test: test.name)
    paired_tests = MapDictValues(paired_tests, CompareTests)
    return {"name": linux.name, "tests": paired_tests}
  else:
    assert linux or fuchsia
    if linux:
      logging.error("Fuchsia was missing test target {}".format(linux.name))
    else:
      logging.error("Linux was missing test target {}".format(fuchsia.name))
    return None
def CompareTargets ( linux : TargetStats , fuchsia : TargetStats ) -> Dict [ str , Any ] : if linux and fuchsia : assert linux . name == fuchsia . name paired_tests = ZipListsByPredicate ( linux . tests , fuchsia . tests , lambda test : test . name ) paired_tests = MapDictValues ( paired_tests , CompareTests ) return { "name" : linux . name , "tests" : paired_tests } else : assert linux or fuchsia if linux : logging . error ( "Fuchsia was missing test target {}" . format ( linux . name ) ) else : logging . error ( "Linux was missing test target {}" . format ( fuchsia . name ) ) return None
Compare takes a corpus of statistics from both Fuchsia and Linux, and then
lines up the values, compares them to each other, and writes them into a
dictionary that can be JSONified.
Compare takes a corpus of statistics from both Fuchsia and Linux and then lines up the values compares them to each other and writes them into a dictionary that can be JSONified .
"""Compare takes a corpus of statistics from both Fuchsia and Linux, and then
  lines up the values, compares them to each other, and writes them into a
  dictionary that can be JSONified.
  """ # One of them has to be non-null, by the way ZipListsByPredicate functions
linux
TargetStats
fuchsia
TargetStats