diff --git a/bench/bench.py b/bench/bench.py new file mode 100644 index 000000000..b38251a15 --- /dev/null +++ b/bench/bench.py @@ -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) diff --git a/bench/empty.py b/bench/empty.py new file mode 100644 index 000000000..c9e2e6b5f --- /dev/null +++ b/bench/empty.py @@ -0,0 +1,3 @@ + +for i in range(1000): + exec "def test_func_%d(): pass" % i