ich versuche mit pybench (siehe:
http://svn.python.org/view/python/trunk/Tools/pybench/)
die Geschwindigkeit von Python unter Linux und unter Windows XP in einer vmware Maschine zu vergleichen.
Unter Linux habe ich auf einem Core Dual mit 2.166 Ghz Takt
eine Zeit von 5,8 Sekunden gemessen (Python 2.51).
Unter vmware bekomme ich folgende Fehlermeldung:
Code: Alles auswählen
C:\Dokumente und Einstellungen\ufechner.PEGASUS\Desktop\pybench>python pybench.py --debug
-------------------------------------------------------------------------------
PYBENCH 2.0
-------------------------------------------------------------------------------
* disabled garbage collection
* system check interval set to maximum: 2147483647
* using timer: time.clock
Calibrating tests. Please wait...
Traceback (most recent call last):
File "pybench.py", line 959, in <module>
PyBenchCmdline()
File "/home/ufechner/Desktop/pybench/CommandLine.py", line 346, in __init__
File "pybench.py", line 925, in main
bench.calibrate()
File "pybench.py", line 512, in calibrate
test.calibrate_test()
File "/home/ufechner/Desktop/pybench/pybench.py", line 304, in calibrate_test
ValueError: calibration setup did not work
C:\Dokumente und Einstellungen\ufechner.PEGASUS\Desktop\pybench>
Code: Alles auswählen
def calibrate_test(self):
if self.calibration_runs == 0:
self.overhead_times = [0.0]
return
calibrate = self.calibrate
timer = self.get_timer()
calibration_loops = range(CALIBRATION_LOOPS)
# Time the calibration loop overhead
prep_times = []
for i in range(self.calibration_runs):
t = timer()
for i in calibration_loops:
pass
t = timer() - t
prep_times.append(t)
min_prep_time = min(prep_times)
if _debug:
print
print 'Calib. prep time = %.6fms' % (
min_prep_time * MILLI_SECONDS)
# Time the calibration runs (doing CALIBRATION_LOOPS loops of
# .calibrate() method calls each)
for i in range(self.calibration_runs):
t = timer()
for i in calibration_loops:
calibrate()
t = timer() - t
self.overhead_times.append(t / CALIBRATION_LOOPS
- min_prep_time)
# Check the measured times
min_overhead = min(self.overhead_times)
max_overhead = max(self.overhead_times)
if _debug:
print 'Calib. overhead time = %.6fms' % (
min_overhead * MILLI_SECONDS)
if min_overhead < 0.0:
raise ValueError('calibration setup did not work')
if max_overhead - min_overhead > 0.1:
raise ValueError(
'overhead calibration timing range too inaccurate: '
'%r - %r' % (min_overhead, max_overhead))
Woran kann so etwas liegen?
Hat irgendjemand schon einmal pybench.py 2.0 in einer
vmware Maschine erfolgreich ausführen können?
Mfg:
Uwe Fechner