[Python-Dev] Python Benchmarks

M.-A. Lemburg mal at egenix.com
Tue Jun 13 11:04:34 CEST 2006


Fredrik,

could you check whether the get_machine_details() function
is causing the hand on your machine ?

Does anyone else observe this as well ?

I'm about to check in version 2.0 of pybench, but would like
to get this resolved first, if possible.

Thanks,
-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Jun 13 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/
________________________________________________________________________
2006-07-03: EuroPython 2006, CERN, Switzerland              19 days left

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

M.-A. Lemburg wrote:
> Fredrik Lundh wrote:
>> M.-A. Lemburg wrote:
>>
>>> You can download a current snapshot from:
>>>
>>> http://www.egenix.com/files/python/pybench-2.0-2006-06-09.zip
>> believe it or not, but this hangs on my machine, under 2.5 trunk.  and 
>> it hangs hard; nether control-c, break, or the task manager manages to 
>> kill it.
> 
> Weird.
> 
>> if it's any clue, it prints
>>
>>> -------------------------------------------------------------------------------
>>> PYBENCH 2.0
>>> -------------------------------------------------------------------------------
>>> * using Python 2.5a2
>>> * disabled garbage collection
>>> * system check interval set to maximum: 2147483647
>>> * using timer: time.clock
>> and that's it; the process is just sitting there, using exactly 0% CPU.
> 
> This is the output to expect:
> 
> -------------------------------------------------------------------------------
> PYBENCH 2.0
> -------------------------------------------------------------------------------
> * using Python 2.4.2
> * disabled garbage collection
> * system check interval set to maximum: 2147483647
> * using timer: time.time
> 
> Calibrating tests. Please wait...
> 
> Running 10 round(s) of the suite at warp factor 10:
> 
> * Round 1 done in 6.627 seconds.
> * Round 2 done in 7.307 seconds.
> * Round 3 done in 7.180 seconds.
> ...
> 
> Note that the calibration step takes a while.
> 
> Looking at the code, the only place where it could
> hang (because it's relying on a few external tools)
> is when fetching the platform details:
> 
> def get_machine_details():
> 
>     import platform
>     buildno, builddate = platform.python_build()
>     python = platform.python_version()
>     if python > '2.0':
>         try:
>             unichr(100000)
>         except ValueError:
>             # UCS2 build (standard)
>             unicode = 'UCS2'
>         else:
>             # UCS4 build (most recent Linux distros)
>             unicode = 'UCS4'
>     else:
>         unicode = None
>     bits, linkage = platform.architecture()
>     return {
>         'platform': platform.platform(),
>         'processor': platform.processor(),
>         'executable': sys.executable,
>         'python': platform.python_version(),
>         'compiler': platform.python_compiler(),
>         'buildno': buildno,
>         'builddate': builddate,
>         'unicode': unicode,
>         'bits': bits,
>         }
> 
> It does run fine on my WinXP machine, both with the win32
> package installed or not.
> 


More information about the Python-Dev mailing list