parameters: (self,
                 traces: TraceListReference,
                 config: BatchTraceProcessorConfig = BatchTraceProcessorConfig())
docstring: Creates a batch trace processor instance.
  
      BatchTraceProcessor is the blessed way of running ad-hoc queries in
      Python across many traces.
  
      Args:
        traces: A list of traces, a trace URI resolver or a URI which
          can be resolved to a list of traces.
  
          If a list, each of items must be one of the following types:
          1) path to a trace file to open and read
          2) a file like object (file, io.BytesIO or similar) to read
          3) a generator yielding bytes
          4) an URI which resolves to a trace
  
          A trace URI resolver is a subclass of resolver.TraceUriResolver
          which generates a list of trace references when the |resolve|
          method is called on it.
  
          A URI is similar to a connection string (e.g. for a web
          address or SQL database) which specifies where to lookup traces
          and which traces to pick from this data source. The format of a
          string should be as follows:
          resolver_name:key_1=list,of,values;key_2=value
  
          Custom resolvers can be provided to handle URIs via
          |config.resolver_registry|.
        config: configuration options which customize functionality of batch
          trace processor and underlying trace processors.
docstring_summary: Creates a batch trace processor instance.
docstring_tokens: Creates a batch trace processor instance .
function: def __init__(self,
                 traces: TraceListReference,
                 config: BatchTraceProcessorConfig = BatchTraceProcessorConfig()):
      """Creates a batch trace processor instance.
  
      BatchTraceProcessor is the blessed way of running ad-hoc queries in
      Python across many traces.
  
      Args:
        traces: A list of traces, a trace URI resolver or a URI which
          can be resolved to a list of traces.
  
          If a list, each of items must be one of the following types:
          1) path to a trace file to open and read
          2) a file like object (file, io.BytesIO or similar) to read
          3) a generator yielding bytes
          4) an URI which resolves to a trace
  
          A trace URI resolver is a subclass of resolver.TraceUriResolver
          which generates a list of trace references when the |resolve|
          method is called on it.
  
          A URI is similar to a connection string (e.g. for a web
          address or SQL database) which specifies where to lookup traces
          and which traces to pick from this data source. The format of a
          string should be as follows:
          resolver_name:key_1=list,of,values;key_2=value
  
          Custom resolvers can be provided to handle URIs via
          |config.resolver_registry|.
        config: configuration options which customize functionality of batch
          trace processor and underlying trace processors.
      """
  
      self.tps = None
      self.closed = False
  
      self.platform_delegate = PLATFORM_DELEGATE()
      self.tp_platform_delegate = TP_PLATFORM_DELEGATE()
      self.config = config
  
      # Make sure the descendent trace processors are using the same resolver
      # registry (even though they won't actually use it as we will resolve
      # everything fully in this class).
      self.resolver_registry = config.tp_config.resolver_registry or \
        self.tp_platform_delegate.default_resolver_registry()
      self.config.tp_config.resolver_registry = self.resolver_registry
  
      # Resolve all the traces to their final form.
      resolved = self.resolver_registry.resolve(traces)
  
      # As trace processor is completely CPU bound, it makes sense to just
      # max out the CPUs available.
      query_executor = self.platform_delegate.create_query_executor(
          len(resolved)) or cf.ThreadPoolExecutor(
              max_workers=multiprocessing.cpu_count())
      load_exectuor = self.platform_delegate.create_load_executor(
          len(resolved)) or query_executor
  
      self.query_executor = query_executor
      self.metadata = [t.metadata for t in resolved]
      self.tps = list(load_exectuor.map(self._create_tp, resolved))
function_tokens: def __init__ ( self , traces : TraceListReference , config : BatchTraceProcessorConfig = BatchTraceProcessorConfig ( ) ) : self . tps = None self . closed = False self . platform_delegate = PLATFORM_DELEGATE ( ) self . tp_platform_delegate = TP_PLATFORM_DELEGATE ( ) self . config = config # Make sure the descendent trace processors are using the same resolver # registry (even though they won't actually use it as we will resolve # everything fully in this class). self . resolver_registry = config . tp_config . resolver_registry or self . tp_platform_delegate . default_resolver_registry ( ) self . config . tp_config . resolver_registry = self . resolver_registry # Resolve all the traces to their final form. resolved = self . resolver_registry . resolve ( traces ) # As trace processor is completely CPU bound, it makes sense to just # max out the CPUs available. query_executor = self . platform_delegate . create_query_executor ( len ( resolved ) ) or cf . ThreadPoolExecutor ( max_workers = multiprocessing . cpu_count ( ) ) load_exectuor = self . platform_delegate . create_load_executor ( len ( resolved ) ) or query_executor self . query_executor = query_executor self . metadata = [ t . metadata for t in resolved ] self . tps = list ( load_exectuor . map ( self . _create_tp , resolved ) )