code: def run(self):
          '''
          Collect all tests to run and run them.
  
          Each method will be run :attr:`Benchmark.times`.
          '''
          tests = self._collect()
  
          if not tests:
              return
  
          self.times
          self.before_class()
  
          for test in tests:
              func = getattr(self, test)
              results = self.results[test] = Result()
              self._before(self, test)
              self.before()
              for i in range(self.times):
                  self._before_each(self, test, i)
                  result = self._run_one(func)
                  results.total += result.duration
                  if result.success:
                      results.has_success = True
                  else:
                      results.has_errors = True
                  self._after_each(self, test, i)
                  if self.debug and not result.success:
                      results.error = result.result
                      break
              self.after()
              self._after(self, test)
  
          self.after_class(f run(self):
          '''
          Collect all tests to run and run them.
  
          Each method will be run :attr:`Benchmark.times`.
          '''
          tests = self._collect()
  
          if not tests:
              return
  
          self.times
          self.before_class()
  
          for test in tests:
              func = getattr(self, test)
              results = self.results[test] = Result()
              self._before(self, test)
              self.before()
              for i in range(self.times):
                  self._before_each(self, test, i)
                  result = self._run_one(func)
                  results.total += result.duration
                  if result.success:
                      results.has_success = True
                  else:
                      results.has_errors = True
                  self._after_each(self, test, i)
                  if self.debug and not result.success:
                      results.error = result.result
                      break
              self.after()
              self._after(self, test)
  
          self.after_class()
docs: Collect all tests to run and run them.
  
          Each method will be run :attr:`Benchmark.times`.