tools/perf/process_perf_results.py
def _handle_perf_logs(benchmark_directory_map, extra_links):
  """ Upload benchmark logs to logdog and add a page entry for them. """
  begin_time = time.time()
  benchmark_logs_links = collections.defaultdict(list)

  for benchmark_name, directories in benchmark_directory_map.items():
    for directory in directories:
      benchmark_log_file = os.path.join(directory, 'benchmark_log.txt')
      if os.path.exists(benchmark_log_file):
        with open(benchmark_log_file) as f:
          uploaded_link = logdog_helper.text(
              name=_generate_unique_logdog_filename(benchmark_name),
              data=f.read())
          benchmark_logs_links[benchmark_name].append(uploaded_link)

  logdog_file_name = _generate_unique_logdog_filename('Benchmarks_Logs')
  logdog_stream = logdog_helper.text(
      logdog_file_name, json.dumps(benchmark_logs_links, sort_keys=True,
                                   indent=4, separators=(',', ': ')),
      content_type=JSON_CONTENT_TYPE)
  extra_links['Benchmarks logs'] = logdog_stream
  end_time = time.time()
  print_duration('Generating perf log streams', begin_time, end_time)
 Upload benchmark logs to logdog and add a page entry for them. 
Upload benchmark logs to logdog and add a page entry for them.
Upload benchmark logs to logdog and add a page entry for them .
def _handle_perf_logs(benchmark_directory_map, extra_links):
  begin_time = time.time()
  benchmark_logs_links = collections.defaultdict(list)
  for benchmark_name, directories in benchmark_directory_map.items():
    for directory in directories:
      benchmark_log_file = os.path.join(directory, 'benchmark_log.txt')
      if os.path.exists(benchmark_log_file):
        with open(benchmark_log_file) as f:
          uploaded_link = logdog_helper.text(
              name=_generate_unique_logdog_filename(benchmark_name),
              data=f.read())
          benchmark_logs_links[benchmark_name].append(uploaded_link)
  logdog_file_name = _generate_unique_logdog_filename('Benchmarks_Logs')
  logdog_stream = logdog_helper.text(
      logdog_file_name, json.dumps(benchmark_logs_links, sort_keys=True,
                                   indent=4, separators=(',', ': ')),
      content_type=JSON_CONTENT_TYPE)
  extra_links['Benchmarks logs'] = logdog_stream
  end_time = time.time()
  print_duration('Generating perf log streams', begin_time, end_time)
def _handle_perf_logs ( benchmark_directory_map , extra_links ) : begin_time = time . time ( ) benchmark_logs_links = collections . defaultdict ( list ) for benchmark_name , directories in benchmark_directory_map . items ( ) : for directory in directories : benchmark_log_file = os . path . join ( directory , 'benchmark_log.txt' ) if os . path . exists ( benchmark_log_file ) : with open ( benchmark_log_file ) as f : uploaded_link = logdog_helper . text ( name = _generate_unique_logdog_filename ( benchmark_name ) , data = f . read ( ) ) benchmark_logs_links [ benchmark_name ] . append ( uploaded_link ) logdog_file_name = _generate_unique_logdog_filename ( 'Benchmarks_Logs' ) logdog_stream = logdog_helper . text ( logdog_file_name , json . dumps ( benchmark_logs_links , sort_keys = True , indent = 4 , separators = ( ',' , ': ' ) ) , content_type = JSON_CONTENT_TYPE ) extra_links [ 'Benchmarks logs' ] = logdog_stream end_time = time . time ( ) print_duration ( 'Generating perf log streams' , begin_time , end_time )
Upload benchmark logs to logdog and add a page entry for them.
Upload benchmark logs to logdog and add a page entry for them .
""" Upload benchmark logs to logdog and add a page entry for them. """
benchmark_directory_map
extra_links