tools/perf/core/results_processor/processor.py
def UploadArtifacts(test_result, upload_bucket, run_identifier):
  """Upload all artifacts to cloud.

  For a test run, uploads all its artifacts to cloud and sets fetchUrl and
  viewUrl fields in intermediate_results.
  """
  artifacts = test_result.get('outputArtifacts', {})
  for name, artifact in artifacts.items():
    # TODO(crbug.com/981349): Think of a more general way to
    # specify which artifacts deserve uploading.
    if name in [DIAGNOSTICS_NAME, MEASUREMENTS_NAME]:
      continue
    retry_identifier = 'retry_%s' % test_result.get('resultId', '0')
    remote_name = '/'.join(
        [run_identifier, test_result['testPath'], retry_identifier, name])
    urlsafe_remote_name = re.sub(r'[^A-Za-z0-9/.-]+', '_', remote_name)
    cloud_filepath = cloud_storage.Upload(
        upload_bucket, urlsafe_remote_name, artifact['filePath'])
    # Per crbug.com/1033755 some services require fetchUrl.
    artifact['fetchUrl'] = cloud_filepath.fetch_url
    artifact['viewUrl'] = cloud_filepath.view_url
    logging.info('%s: Uploaded %s to %s', test_result['testPath'], name,
                 artifact['viewUrl'])
Upload all artifacts to cloud.

  For a test run, uploads all its artifacts to cloud and sets fetchUrl and
  viewUrl fields in intermediate_results.
  
Upload all artifacts to cloud.
For a test run, uploads all its artifacts to cloud and sets fetchUrl and
viewUrl fields in intermediate_results.
Upload all artifacts to cloud . For a test run uploads all its artifacts to cloud and sets fetchUrl and viewUrl fields in intermediate_results .
def UploadArtifacts(test_result, upload_bucket, run_identifier):
  artifacts = test_result.get('outputArtifacts', {})
  for name, artifact in artifacts.items():
    if name in [DIAGNOSTICS_NAME, MEASUREMENTS_NAME]:
      continue
    retry_identifier = 'retry_%s' % test_result.get('resultId', '0')
    remote_name = '/'.join(
        [run_identifier, test_result['testPath'], retry_identifier, name])
    urlsafe_remote_name = re.sub(r'[^A-Za-z0-9/.-]+', '_', remote_name)
    cloud_filepath = cloud_storage.Upload(
        upload_bucket, urlsafe_remote_name, artifact['filePath'])
    artifact['fetchUrl'] = cloud_filepath.fetch_url
    artifact['viewUrl'] = cloud_filepath.view_url
    logging.info('%s: Uploaded %s to %s', test_result['testPath'], name,
                 artifact['viewUrl'])
def UploadArtifacts ( test_result , upload_bucket , run_identifier ) : artifacts = test_result . get ( 'outputArtifacts' , { } ) for name , artifact in artifacts . items ( ) : if name in [ DIAGNOSTICS_NAME , MEASUREMENTS_NAME ] : continue retry_identifier = 'retry_%s' % test_result . get ( 'resultId' , '0' ) remote_name = '/' . join ( [ run_identifier , test_result [ 'testPath' ] , retry_identifier , name ] ) urlsafe_remote_name = re . sub ( r'[^A-Za-z0-9/.-]+' , '_' , remote_name ) cloud_filepath = cloud_storage . Upload ( upload_bucket , urlsafe_remote_name , artifact [ 'filePath' ] ) artifact [ 'fetchUrl' ] = cloud_filepath . fetch_url artifact [ 'viewUrl' ] = cloud_filepath . view_url logging . info ( '%s: Uploaded %s to %s' , test_result [ 'testPath' ] , name , artifact [ 'viewUrl' ] )
Upload all artifacts to cloud.
Upload all artifacts to cloud .
"""Upload all artifacts to cloud.

  For a test run, uploads all its artifacts to cloud and sets fetchUrl and
  viewUrl fields in intermediate_results.
  """ # TODO(crbug.com/981349): Think of a more general way to # specify which artifacts deserve uploading. # Per crbug.com/1033755 some services require fetchUrl.
test_result
upload_bucket
run_identifier