tools/binary_size/generate_commit_size_analysis.py
def _generate_resource_sizes(to_resource_sizes_py, make_chromium_output_path,
                             make_staging_path):
  """Creates results-chart.json file in staging_dir"""
  cmd = [
      _RESOURCE_SIZES_PATH,
      make_chromium_output_path(to_resource_sizes_py['apk_name']),
      '--output-format=chartjson',
      '--chromium-output-directory',
      make_chromium_output_path(),
      '--output-dir',
      make_staging_path(),
  ]
  FORWARDED_PARAMS = [
      ('--trichrome-library', make_chromium_output_path, 'trichrome_library'),
      ('--trichrome-chrome', make_chromium_output_path, 'trichrome_chrome'),
      ('--trichrome-webview', make_chromium_output_path, 'trichrome_webview'),
  ]
  for switch, fun, key in FORWARDED_PARAMS:
    if key in to_resource_sizes_py:
      cmd += [switch, fun(to_resource_sizes_py[key])]
  subprocess.run(cmd, check=True)
Creates results-chart.json file in staging_dir
Creates results-chart.json file in staging_dir
Creates results - chart . json file in staging_dir
def _generate_resource_sizes(to_resource_sizes_py, make_chromium_output_path,
                             make_staging_path):
  cmd = [
      _RESOURCE_SIZES_PATH,
      make_chromium_output_path(to_resource_sizes_py['apk_name']),
      '--output-format=chartjson',
      '--chromium-output-directory',
      make_chromium_output_path(),
      '--output-dir',
      make_staging_path(),
  ]
  FORWARDED_PARAMS = [
      ('--trichrome-library', make_chromium_output_path, 'trichrome_library'),
      ('--trichrome-chrome', make_chromium_output_path, 'trichrome_chrome'),
      ('--trichrome-webview', make_chromium_output_path, 'trichrome_webview'),
  ]
  for switch, fun, key in FORWARDED_PARAMS:
    if key in to_resource_sizes_py:
      cmd += [switch, fun(to_resource_sizes_py[key])]
  subprocess.run(cmd, check=True)
def _generate_resource_sizes ( to_resource_sizes_py , make_chromium_output_path , make_staging_path ) : cmd = [ _RESOURCE_SIZES_PATH , make_chromium_output_path ( to_resource_sizes_py [ 'apk_name' ] ) , '--output-format=chartjson' , '--chromium-output-directory' , make_chromium_output_path ( ) , '--output-dir' , make_staging_path ( ) , ] FORWARDED_PARAMS = [ ( '--trichrome-library' , make_chromium_output_path , 'trichrome_library' ) , ( '--trichrome-chrome' , make_chromium_output_path , 'trichrome_chrome' ) , ( '--trichrome-webview' , make_chromium_output_path , 'trichrome_webview' ) , ] for switch , fun , key in FORWARDED_PARAMS : if key in to_resource_sizes_py : cmd += [ switch , fun ( to_resource_sizes_py [ key ] ) ] subprocess . run ( cmd , check = True )
Creates results-chart.json file in staging_dir
Creates results - chart . json file in staging_dir
"""Creates results-chart.json file in staging_dir"""
to_resource_sizes_py
make_chromium_output_path
make_staging_path