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