[Python-checkins] r46334 - sandbox/trunk/rjsh-pybench/Arithmetic.py sandbox/trunk/rjsh-pybench/Calls.py sandbox/trunk/rjsh-pybench/Constructs.py sandbox/trunk/rjsh-pybench/Dict.py sandbox/trunk/rjsh-pybench/Empty.py sandbox/trunk/rjsh-pybench/Exceptions.py sandbox/trunk/rjsh-pybench/Imports.py sandbox/trunk/rjsh-pybench/Instances.py sandbox/trunk/rjsh-pybench/Lists.py sandbox/trunk/rjsh-pybench/Lookups.py sandbox/trunk/rjsh-pybench/Numbers.py sandbox/trunk/rjsh-pybench/Strings.py sandbox/trunk/rjsh-pybench/Tuples.py sandbox/trunk/rjsh-pybench/Unicode.py sandbox/trunk/rjsh-pybench/pybench.py

M.-A. Lemburg mal at egenix.com
Fri May 26 16:56:09 CEST 2006


steve.holden wrote:
> Author: steve.holden
> Date: Fri May 26 16:24:51 2006
> New Revision: 46334
> 
> Added:
>    sandbox/trunk/rjsh-pybench/Empty.py   (contents, props changed)
> Modified:
>    sandbox/trunk/rjsh-pybench/Arithmetic.py
>    sandbox/trunk/rjsh-pybench/Calls.py
>    sandbox/trunk/rjsh-pybench/Constructs.py
>    sandbox/trunk/rjsh-pybench/Dict.py
>    sandbox/trunk/rjsh-pybench/Exceptions.py
>    sandbox/trunk/rjsh-pybench/Imports.py
>    sandbox/trunk/rjsh-pybench/Instances.py
>    sandbox/trunk/rjsh-pybench/Lists.py
>    sandbox/trunk/rjsh-pybench/Lookups.py
>    sandbox/trunk/rjsh-pybench/Numbers.py
>    sandbox/trunk/rjsh-pybench/Strings.py
>    sandbox/trunk/rjsh-pybench/Tuples.py
>    sandbox/trunk/rjsh-pybench/Unicode.py
>    sandbox/trunk/rjsh-pybench/pybench.py
> Log:
> Adjust rounds count to make test take roughly euqal time.

When adjusting these, you also need to adjust the version numbers
of the tests - otherwise comparisons would compare apples and
oranges.

> -    def load_tests(self,setupmod,warp=1, limitnames=""):
> +    def load_tests(self, setupmod, warp=1, limitnames="", verbose=0):
>  
>          self.warp = warp
>          if limitnames:
> @@ -233,7 +239,7 @@
>          else:
>              limitnames = None
>          tests = self.tests
> -        print 'Searching for tests...'
> +        print 'Searching for tests ...',

I think this should also be silenced using verbose.

>          setupmod.__dict__.values()
>          for c in setupmod.__dict__.values():
>              if not hasattr(c,'is_a_test'):
> @@ -246,8 +252,12 @@
>              tests[name] = c(warp)
>          l = tests.keys()
>          l.sort()
> -        for t in l:
> -            print '  ',t
> +        if verbose:
> +            print
> +            for t in l:
> +                print '  ',t
> +        else:
> +            print len(l), "found"
>          print

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, May 26 2006)
>>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::


More information about the Python-checkins mailing list