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

def libnamebench::benchmark::Benchmark::Run (   self  ) 

Manage and execute all tests on all nameservers.

We used to run all tests for a nameserver, but the results proved to be
unfair if the bandwidth was suddenly constrained. We now run a test on
each server before moving on to the next.

Definition at line 132 of file benchmark.py.

00132                :
    """Manage and execute all tests on all nameservers.

    We used to run all tests for a nameserver, but the results proved to be
    unfair if the bandwidth was suddenly constrained. We now run a test on
    each server before moving on to the next.
    """
    assert self.test_data
    for test_run in range(self.run_count):
      state = ('Benchmarking %s server(s), run %s of %s' %
               (len(self.nameservers.enabled), test_run+1, self.run_count))
      count = 0
      for (req_type, record) in self.test_data:
        count += 1
        self.msg(state, count=count, total=len(self.test_data))
        for ns in self.nameservers.enabled:
          if ns not in self.results:
            self.results[ns] = []
            for run_num in range(self.run_count):
              self.results[ns].append([])
          (response, duration, error_msg) = ns.TimedRequest(req_type, record)
          if error_msg:
            duration = ns.timeout
          self.results[ns][test_run].append((record, req_type, duration,
                                             response, error_msg))

  def ComputeAverages(self):


Generated by  Doxygen 1.6.0   Back to index