tools/perf/cli_tools/tbmv3/trace_downloader.py
def FindProtoTracePath(html_url):
  """
  Finds the proto trace path given a html trace url.

  In the simple case foo/bar/trace.pb is the proto trace for foo/bar/trace.html.
  But sometimes that's not available so we have to look for a .pb.gz file in a
  special directory."""
  subpath = _GetSubpathInBucket(html_url)
  if subpath.endswith('trace.html'):
    proto_path = subpath.replace('trace.html', 'trace.pb')
    if cloud_storage.Exists(cloud_storage.TELEMETRY_OUTPUT, proto_path):
      return proto_path
    proto_path += '.gz'
    if cloud_storage.Exists(cloud_storage.TELEMETRY_OUTPUT, proto_path):
      return proto_path

  directory_path = '/'.join(subpath.split('/')[:-1])
  return _GetProtoTraceLinkFromTraceEventsDir(directory_path)

  Finds the proto trace path given a html trace url.

  In the simple case foo/bar/trace.pb is the proto trace for foo/bar/trace.html.
  But sometimes that's not available so we have to look for a .pb.gz file in a
  special directory.
Finds the proto trace path given a html trace url.
In the simple case foo/bar/trace.pb is the proto trace for foo/bar/trace.html.
But sometimes that's not available so we have to look for a .pb.gz file in a
special directory.
Finds the proto trace path given a html trace url . In the simple case foo / bar / trace . pb is the proto trace for foo / bar / trace . html . But sometimes that ' s not available so we have to look for a . pb . gz file in a special directory .
def FindProtoTracePath(html_url):
  subpath = _GetSubpathInBucket(html_url)
  if subpath.endswith('trace.html'):
    proto_path = subpath.replace('trace.html', 'trace.pb')
    if cloud_storage.Exists(cloud_storage.TELEMETRY_OUTPUT, proto_path):
      return proto_path
    proto_path += '.gz'
    if cloud_storage.Exists(cloud_storage.TELEMETRY_OUTPUT, proto_path):
      return proto_path
  directory_path = '/'.join(subpath.split('/')[:-1])
  return _GetProtoTraceLinkFromTraceEventsDir(directory_path)
def FindProtoTracePath ( html_url ) : subpath = _GetSubpathInBucket ( html_url ) if subpath . endswith ( 'trace.html' ) : proto_path = subpath . replace ( 'trace.html' , 'trace.pb' ) if cloud_storage . Exists ( cloud_storage . TELEMETRY_OUTPUT , proto_path ) : return proto_path proto_path += '.gz' if cloud_storage . Exists ( cloud_storage . TELEMETRY_OUTPUT , proto_path ) : return proto_path directory_path = '/' . join ( subpath . split ( '/' ) [ : - 1 ] ) return _GetProtoTraceLinkFromTraceEventsDir ( directory_path )
Finds the proto trace path given a html trace url.
Finds the proto trace path given a html trace url .
"""
  Finds the proto trace path given a html trace url.

  In the simple case foo/bar/trace.pb is the proto trace for foo/bar/trace.html.
  But sometimes that's not available so we have to look for a .pb.gz file in a
  special directory."""
html_url