test_ok1/bench/bench.py

11 lines
261 B
Python
Raw Normal View History

if __name__ == '__main__':
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')
2010-11-24 10:32:07 +08:00
print(p.print_stats(30))