tools/perf/cli_tools/tbmv3/trace_downloader.py
def _GetProtoTraceLinkFromTraceEventsDir(link_prefix):
  """Returns the first proto trace in |link_prefix|/trace/traceEvents/"""
  proto_link_prefix = '/'.join([link_prefix, 'trace/traceEvents/**'])
  try:
    for link in cloud_storage.List(cloud_storage.TELEMETRY_OUTPUT,
                                   proto_link_prefix):
      if link.endswith('.pb.gz') or link.endswith('.pb'):
        return link[1:]  # Strip the initial '/'.
  except cloud_storage.NotFoundError as e:
    # This directory doesn't exist at all.
    raise cloud_storage.NotFoundError('No URLs match the prefix %s: %s' %
                                      (proto_link_prefix, str(e)))
  # The directory exists, but no proto trace found.
  raise cloud_storage.NotFoundError(
      'Proto trace not found in cloud storage. Path: %s.' % proto_link_prefix)
Returns the first proto trace in |link_prefix|/trace/traceEvents/
Returns the first proto trace in |link_prefix|/trace/traceEvents
Returns the first proto trace in |link_prefix| / trace / traceEvents
def _GetProtoTraceLinkFromTraceEventsDir(link_prefix):
  proto_link_prefix = '/'.join([link_prefix, 'trace/traceEvents/**'])
  try:
    for link in cloud_storage.List(cloud_storage.TELEMETRY_OUTPUT,
                                   proto_link_prefix):
      if link.endswith('.pb.gz') or link.endswith('.pb'):
        return link[1:]  
  except cloud_storage.NotFoundError as e:
    raise cloud_storage.NotFoundError('No URLs match the prefix %s: %s' %
                                      (proto_link_prefix, str(e)))
  raise cloud_storage.NotFoundError(
      'Proto trace not found in cloud storage. Path: %s.' % proto_link_prefix)
def _GetProtoTraceLinkFromTraceEventsDir ( link_prefix ) : proto_link_prefix = '/' . join ( [ link_prefix , 'trace/traceEvents/**' ] ) try : for link in cloud_storage . List ( cloud_storage . TELEMETRY_OUTPUT , proto_link_prefix ) : if link . endswith ( '.pb.gz' ) or link . endswith ( '.pb' ) : return link [ 1 : ] except cloud_storage . NotFoundError as e : raise cloud_storage . NotFoundError ( 'No URLs match the prefix %s: %s' % ( proto_link_prefix , str ( e ) ) ) raise cloud_storage . NotFoundError ( 'Proto trace not found in cloud storage. Path: %s.' % proto_link_prefix )
Returns the first proto trace in |link_prefix|/trace/traceEvents
Returns the first proto trace in |link_prefix| / trace / traceEvents
"""Returns the first proto trace in |link_prefix|/trace/traceEvents/""" # Strip the initial '/'. # This directory doesn't exist at all. # The directory exists, but no proto trace found.
link_prefix