parameters: (loading_trace_path,
                   output_format='{url}',
                   where_format='{url}',
                   where_statement=None)
docstring: `loading_trace_analyzer.py requests` Command line tool entry point.
  
    Args:
      loading_trace_path: Path of the loading trace.
      output_format: Output format of the generated strings.
      where_format: String formated to be regex tested with <where_statement>
      where_statement: Regex for selecting request event.
  
    Yields:
      Formated string of the selected request event.
  
    Example:
      Lists all request with timing:
        ... requests --output-format "{timing} {url}"
  
      Lists  HTTP/HTTPS requests that have used the cache:
        ... requests --where "{protocol} {from_disk_cache}" "https?\S* True"
docstring_summary: `loading_trace_analyzer.py requests` Command line tool entry point.
docstring_tokens: loading_trace_analyzer . py requests Command line tool entry point .
function: def ListRequests(loading_trace_path,
                   output_format='{url}',
                   where_format='{url}',
                   where_statement=None):
    """`loading_trace_analyzer.py requests` Command line tool entry point.
  
    Args:
      loading_trace_path: Path of the loading trace.
      output_format: Output format of the generated strings.
      where_format: String formated to be regex tested with <where_statement>
      where_statement: Regex for selecting request event.
  
    Yields:
      Formated string of the selected request event.
  
    Example:
      Lists all request with timing:
        ... requests --output-format "{timing} {url}"
  
      Lists  HTTP/HTTPS requests that have used the cache:
        ... requests --where "{protocol} {from_disk_cache}" "https?\S* True"
    """
    if where_statement:
      where_statement = re.compile(where_statement)
    loading_trace = LoadingTrace.FromJsonFile(loading_trace_path)
    for request_event in loading_trace.request_track.GetEvents():
      request_event_json = request_event.ToJsonDict()
      if where_statement != None:
        where_in = where_format.format(**request_event_json)
        if not where_statement.match(where_in):
          continue
      yield output_format.format(**request_event_json)
function_tokens: def ListRequests ( loading_trace_path , output_format = '{url}' , where_format = '{url}' , where_statement = None ) : if where_statement : where_statement = re . compile ( where_statement ) loading_trace = LoadingTrace . FromJsonFile ( loading_trace_path ) for request_event in loading_trace . request_track . GetEvents ( ) : request_event_json = request_event . ToJsonDict ( ) if where_statement != None : where_in = where_format . format ( * * request_event_json ) if not where_statement . match ( where_in ) : continue yield output_format . format ( * * request_event_json )