13 logf
= tempfile
.NamedTemporaryFile()
16 p
= hotshot
.Profile(logfile
)
17 benchtime
, stones
= p
.runcall(test
.pystone
.pystones
)
20 print "Pystone(%s) time for %d passes = %g" % \
21 (test
.pystone
.__version
__, test
.pystone
.LOOPS
, benchtime
)
22 print "This machine benchmarks at %g pystones/second" % stones
24 stats
= hotshot
.stats
.load(logfile
)
26 stats
.sort_stats('time', 'calls')
30 if e
.errno
!= errno
.EPIPE
: