Home | History | Annotate | Download | only in pybench

Lines Matching defs:Test

61 # Minimum test run-time
152 ### Test baseclass
154 class Test:
156 """ All test must have this class as baseclass. It provides
160 test run between 20-50 seconds. This is needed because
170 If you change a test in some way, don't forget to increase
175 ### Instance variables that each test should override
177 # Version number of the test as float (x.yy); this is important
183 # test. An operation is the basic unit of what you want to
187 # sets of operations more than once per test round. The measured
188 # overhead per test round should be less than 1 second.
191 # Number of rounds to execute per test run. This should be
192 # adjusted to a figure that results in a test run-time of between
198 # Mark this class as implementing a test
204 # Warp factor to use for this test
213 # List of test run timings
247 """ Return the timer function to use for the test.
254 """ Return 1/0 depending on whether the test is compatible
255 with the other Test instance or not.
313 """ Run the test in two phases: first calibrate, then
314 do the actual test. Be careful to keep the calibration
315 timing low w/r to the test timing.
318 test = self.test
324 # Test run
326 test()
330 'test times are < 10ms')
339 """ Calibrate the test.
342 setup and run the test - except for the actual operations
344 measure the test implementation overhead.
349 def test(self):
351 """ Run the test.
353 The test needs to run self.rounds executing
361 """ Return test run statistics as tuple:
387 # This has to be done after the definition of the Test class, since
449 """ Return the timer function to use for the test.
483 if name == 'Test':
508 print 'Test min max'
513 name, test = tests[i]
514 test.calibrate_test()
518 min(test.overhead_times) * MILLI_SECONDS,
519 max(test.overhead_times) * MILLI_SECONDS)
541 name, test
544 test.run()
545 (eff_time, abs_time, min_overhead) = test.last_timing
573 XXX Currently not used, since the benchmark does test
602 print ('Test '
609 for name, test in tests:
617 min_overhead) = test.stat()
648 print ('Test '
654 # Print test comparisons
661 for name, test in tests:
669 min_overhead) = test.stat()
677 # Other benchmark doesn't include the given test
691 test.compatible(other)):
719 # Summarise test results
753 header = ("PYBENCH - a benchmark test suite for Python "
828 print '* limiting test names to one with substring "%s"' % \