adding a small bench script to see where time is spend in the hook architecture

--HG--
branch : trunk
This commit is contained in:
holger krekel 2010-10-15 16:36:25 +02:00
parent 1b7d2b07ab
commit 5a0ef7355e
2 changed files with 12 additions and 0 deletions

9
bench/bench.py Normal file
View File

@ -0,0 +1,9 @@
import cProfile
import py
import pstats
stats = cProfile.run('py.test.cmdline.main(["empty.py"])', 'prof')
p = pstats.Stats("prof")
p.strip_dirs()
p.sort_stats('cumulative')
print p.print_stats(30)

3
bench/empty.py Normal file
View File

@ -0,0 +1,3 @@
for i in range(1000):
exec "def test_func_%d(): pass" % i