tools/fuchsia/comparative_tester/generate_perf_report.py
def DirectoryStats(directory: str) -> List[TargetStats]:
  """Takes a path to directory, and uses JSON files in that directory to compile
  a list of statistical objects for each independent test target it can detect
  in the directory.

  Args:
    directory (str): The directory to scan for relevant JSONs

  Returns:
    List[TargetStats]: Each element in this list is one target, averaged up over
        all of its executions.
  """
  resultMap = {}  # type: Dict[str, List[TargetResult]]
  for file in os.listdir(directory):
    results = ReadTargetFromJson("{}/{}".format(directory, file))
    if not results.name in resultMap.keys():
      resultMap[results.name] = [results]
    else:
      resultMap[results.name].append(results)

  targets = []
  for _, resultList in resultMap.items():
    targets.append(TargetFromList(resultList))
  return targets
Takes a path to directory, and uses JSON files in that directory to compile
  a list of statistical objects for each independent test target it can detect
  in the directory.

  Args:
    directory (str): The directory to scan for relevant JSONs

  Returns:
    List[TargetStats]: Each element in this list is one target, averaged up over
        all of its executions.
  
Takes a path to directory, and uses JSON files in that directory to compile
a list of statistical objects for each independent test target it can detect
in the directory.
Takes a path to directory and uses JSON files in that directory to compile a list of statistical objects for each independent test target it can detect in the directory .
def DirectoryStats(directory: str) -> List[TargetStats]:
  resultMap = {}  
  for file in os.listdir(directory):
    results = ReadTargetFromJson("{}/{}".format(directory, file))
    if not results.name in resultMap.keys():
      resultMap[results.name] = [results]
    else:
      resultMap[results.name].append(results)
  targets = []
  for _, resultList in resultMap.items():
    targets.append(TargetFromList(resultList))
  return targets
def DirectoryStats ( directory : str ) -> List [ TargetStats ] : resultMap = { } for file in os . listdir ( directory ) : results = ReadTargetFromJson ( "{}/{}" . format ( directory , file ) ) if not results . name in resultMap . keys ( ) : resultMap [ results . name ] = [ results ] else : resultMap [ results . name ] . append ( results ) targets = [ ] for _ , resultList in resultMap . items ( ) : targets . append ( TargetFromList ( resultList ) ) return targets
Takes a path to directory, and uses JSON files in that directory to compile
a list of statistical objects for each independent test target it can detect
in the directory.
Takes a path to directory and uses JSON files in that directory to compile a list of statistical objects for each independent test target it can detect in the directory .
"""Takes a path to directory, and uses JSON files in that directory to compile
  a list of statistical objects for each independent test target it can detect
  in the directory.

  Args:
    directory (str): The directory to scan for relevant JSONs

  Returns:
    List[TargetStats]: Each element in this list is one target, averaged up over
        all of its executions.
  """ # type: Dict[str, List[TargetResult]]
Each element in this list is one target, averaged up over
all of its executions.
Each element in this list is one target averaged up over all of its executions .
List[TargetStats]
directory
str
The directory to scan for relevant JSONs
The directory to scan for relevant JSONs