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

def libnamebench::base_ui::BaseUI::PrepareBenchmark (   self  )  [inherited]

Setup the benchmark object with the appropriate dataset.

Definition at line 83 of file base_ui.py.

00083                             :
    """Setup the benchmark object with the appropriate dataset."""
    self.bmark = benchmark.Benchmark(self.nameservers,
                                     test_count=self.options.test_count,
                                     run_count=self.options.run_count,
                                     status_callback=self.UpdateStatus)

    self.bmark.UpdateStatus = self.UpdateStatus
    self.UpdateStatus('Creating test records using %s' % self.options.select_mode)
    if self.options.import_source:
      hosts = self.hparser.GetParsedSource(self.options.import_source)
      self.UpdateStatus('%s has %s hosts' % (self.options.import_source, len(hosts)))
      test_data = self.hparser.GenerateTestData(hosts)
      self.UpdateStatus('%s records available in test pool' % len(test_data))
      self.bmark.CreateTests(test_data, select_mode=self.options.select_mode)
    else:
      # The Alexa data (by default)
      self.bmark.CreateTestsFromFile(self.options.data_file,
                                     select_mode=self.options.select_mode)

  def RunBenchmark(self):


Generated by  Doxygen 1.6.0   Back to index