Logo Search packages:      
Sourcecode: namebench version File versions  Download package

def libnamebench::history_parser::HistoryParser::ParseAllTypes (   self  ) 

For each type we know of, attempt to find and parse each of them.

Returns:
  dict of type: list of hosts

Definition at line 116 of file history_parser.py.

00116                          :
    """For each type we know of, attempt to find and parse each of them.

    Returns:
      dict of type: list of hosts
    """
    start_time = time.time()
    results = {}
    records = 0
    threads = []

    for type in self.GetTypes():
      thread = ParserThread(type)
      thread.start()
      threads.append(thread)

    for thread in threads:
      thread.join()
      if thread.hosts:
        records += len(thread.hosts)

      if thread.hosts and len(thread.hosts) >= self.MIN_RECOMMENDED_RECORD_COUNT:
        results[thread.type] = thread.hosts
        print "- Found %s records from %s" % (len(thread.hosts), thread.type)
      elif thread.hosts == False:
        pass
      elif not thread.hosts:
        print '- No records found in %s' % (thread.type)
      else:
        print '- Ignoring %s (only %s records)' % (thread.type, len(thread.hosts))

    print '- Read %s records from %s in %ss' % (records, ', '.join(results.keys()), time.time() - start_time)
    return results

  def ParseByFilename(self, filename):


Generated by  Doxygen 1.6.0   Back to index