original_docstring: Starts everything up in a single process.
  
      This should not normally be used, since running the tool in a single
      process buffers up everything into memory until the storage is called.
  
      Just to make it clear, this starts up the collection, completes that
      before calling the worker that extracts all EventObjects and stores
      them in memory. when that is all done, the storage function is called
      to drain the buffer. Hence the tool's excessive use of memory in this
      mode and the reason why it is not suggested to be used except for
      debugging reasons (and mostly to get into the debugger).
  
      This is therefore mostly useful during debugging sessions for some
      limited parsing.
  
      Args:
        options: the command line arguments (instance of argparse.Namespace).
      
docstring: Starts everything up in a single process.
  This should not normally be used, since running the tool in a single
  process buffers up everything into memory until the storage is called.
  
  Just to make it clear, this starts up the collection, completes that
  before calling the worker that extracts all EventObjects and stores
  them in memory. when that is all done, the storage function is called
  to drain the buffer. Hence the tool's excessive use of memory in this
  mode and the reason why it is not suggested to be used except for
  debugging reasons (and mostly to get into the debugger).
  
  This is therefore mostly useful during debugging sessions for some
  limited parsing.
docstring_tokens: Starts everything up in a single process . This should not normally be used since running the tool in a single process buffers up everything into memory until the storage is called . Just to make it clear this starts up the collection completes that before calling the worker that extracts all EventObjects and stores them in memory . when that is all done the storage function is called to drain the buffer . Hence the tool ' s excessive use of memory in this mode and the reason why it is not suggested to be used except for debugging reasons ( and mostly to get into the debugger ) . This is therefore mostly useful during debugging sessions for some limited parsing .
code: def _StartSingleThread(self, options):
      """Starts everything up in a single process.
  
      This should not normally be used, since running the tool in a single
      process buffers up everything into memory until the storage is called.
  
      Just to make it clear, this starts up the collection, completes that
      before calling the worker that extracts all EventObjects and stores
      them in memory. when that is all done, the storage function is called
      to drain the buffer. Hence the tool's excessive use of memory in this
      mode and the reason why it is not suggested to be used except for
      debugging reasons (and mostly to get into the debugger).
  
      This is therefore mostly useful during debugging sessions for some
      limited parsing.
  
      Args:
        options: the command line arguments (instance of argparse.Namespace).
      """
      collection_queue = queue.SingleThreadedQueue()
      storage_queue = queue.SingleThreadedQueue()
      parse_error_queue = queue.SingleThreadedQueue()
      self._engine = engine.Engine(
          collection_queue, storage_queue, parse_error_queue)
  
      # TODO: add support to handle multiple partitions.
      self._engine.SetSource(
          self.GetSourcePathSpec(), resolver_context=self._resolver_context)
  
      logging.debug(u'Starting preprocessing.')
      pre_obj = self.PreprocessSource(options)
  
      logging.debug(u'Preprocessing done.')
  
      # TODO: make sure parsers option is not set by preprocessing.
      parser_filter_string = getattr(options, 'parsers', '')
  
      self._parser_names = []
      for _, parser_class in parsers_manager.ParsersManager.GetParsers(
          parser_filter_string=parser_filter_string):
        self._parser_names.append(parser_class.NAME)
  
      self._PreprocessSetCollectionInformation(options, pre_obj)
  
      if 'filestat' in self._parser_names:
        include_directory_stat = True
      else:
        include_directory_stat = False
  
      filter_file = getattr(options, 'file_filter', None)
      if filter_file:
        filter_find_specs = engine_utils.BuildFindSpecsFromFile(
            filter_file, pre_obj=pre_obj)
      else:
        filter_find_specs = None
  
      self._collector = self._engine.CreateCollector(
          include_directory_stat, vss_stores=self._vss_stores,
          filter_find_specs=filter_find_specs,
          resolver_context=self._resolver_context)
  
      self._DebugPrintCollector(options)
  
      logging.debug(u'Starting collection.')
      self._collector.Collect()
      logging.debug(u'Collection done.')
  
      extraction_worker = self._CreateExtractionWorker(0, options)
  
      logging.debug(u'Starting extraction worker.')
      extraction_worker.Run(parser_filter_string=parser_filter_string)
      logging.debug(u'Extraction worker done.')
  
      self._engine.SignalEndOfInputStorageQueue()
  
      output_module = getattr(options, 'output_module', None)
      if output_module:
        storage_writer = storage.BypassStorageWriter(
            storage_queue, self._storage_file_path,
            output_module_string=output_module, pre_obj=pre_obj)
      else:
        storage_writer = storage.StorageFileWriter(
            storage_queue, self._storage_file_path,
            buffer_size=self._buffer_size, pre_obj=pre_obj)
  
      logging.debug(u'Starting storage.')
      storage_writer.WriteEventObjects()
      logging.debug(u'Storage done.')
  
      self._resolver_context.Empty()
code_tokens: def _StartSingleThread ( self , options ) : collection_queue = queue . SingleThreadedQueue ( ) storage_queue = queue . SingleThreadedQueue ( ) parse_error_queue = queue . SingleThreadedQueue ( ) self . _engine = engine . Engine ( collection_queue , storage_queue , parse_error_queue ) self . _engine . SetSource ( self . GetSourcePathSpec ( ) , resolver_context = self . _resolver_context ) logging . debug ( u'Starting preprocessing.' ) pre_obj = self . PreprocessSource ( options ) logging . debug ( u'Preprocessing done.' ) parser_filter_string = getattr ( options , 'parsers' , '' ) self . _parser_names = [ ] for _ , parser_class in parsers_manager . ParsersManager . GetParsers ( parser_filter_string = parser_filter_string ) : self . _parser_names . append ( parser_class . NAME ) self . _PreprocessSetCollectionInformation ( options , pre_obj ) if 'filestat' in self . _parser_names : include_directory_stat = True else : include_directory_stat = False filter_file = getattr ( options , 'file_filter' , None ) if filter_file : filter_find_specs = engine_utils . BuildFindSpecsFromFile ( filter_file , pre_obj = pre_obj ) else : filter_find_specs = None self . _collector = self . _engine . CreateCollector ( include_directory_stat , vss_stores = self . _vss_stores , filter_find_specs = filter_find_specs , resolver_context = self . _resolver_context ) self . _DebugPrintCollector ( options ) logging . debug ( u'Starting collection.' ) self . _collector . Collect ( ) logging . debug ( u'Collection done.' ) extraction_worker = self . _CreateExtractionWorker ( 0 , options ) logging . debug ( u'Starting extraction worker.' ) extraction_worker . Run ( parser_filter_string = parser_filter_string ) logging . debug ( u'Extraction worker done.' ) self . _engine . SignalEndOfInputStorageQueue ( ) output_module = getattr ( options , 'output_module' , None ) if output_module : storage_writer = storage . BypassStorageWriter ( storage_queue , self . _storage_file_path , output_module_string = output_module , pre_obj = pre_obj ) else : storage_writer = storage . StorageFileWriter ( storage_queue , self . _storage_file_path , buffer_size = self . _buffer_size , pre_obj = pre_obj ) logging . debug ( u'Starting storage.' ) storage_writer . WriteEventObjects ( ) logging . debug ( u'Storage done.' ) self . _resolver_context . Empty ( )
short_docstring: Starts everything up in a single process.
short_docstring_tokens: Starts everything up in a single process .
comment: """Starts everything up in a single process.
  
      This should not normally be used, since running the tool in a single
      process buffers up everything into memory until the storage is called.
  
      Just to make it clear, this starts up the collection, completes that
      before calling the worker that extracts all EventObjects and stores
      them in memory. when that is all done, the storage function is called
      to drain the buffer. Hence the tool's excessive use of memory in this
      mode and the reason why it is not suggested to be used except for
      debugging reasons (and mostly to get into the debugger).
  
      This is therefore mostly useful during debugging sessions for some
      limited parsing.
  
      Args:
        options: the command line arguments (instance of argparse.Namespace).
      """$SEP$# TODO: add support to handle multiple partitions.$SEP$# TODO: make sure parsers option is not set by preprocessing.