p
= hotshot
.Profile(logfile
)
benchtime
, stones
= p
.runcall(test
.pystone
.pystones
)
print "Pystone(%s) time for %d passes = %g" % \
(test
.pystone
.__version
__, test
.pystone
.LOOPS
, benchtime
)
print "This machine benchmarks at %g pystones/second" % stones
stats
= hotshot
.stats
.load(logfile
)
stats
.sort_stats('time', 'calls')
if e
.errno
!= errno
.EPIPE
:
if __name__
== '__main__':
main(tempfile
.NamedTemporaryFile().name
)