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