blob: c0b76472a9b7f6fe70b4e24aa5d7226ea6140bd2 (
plain)
1
2
3
4
5
6
7
8
|
import pstats, cProfile
import calc_pi
cProfile.runctx("calc_pi.approx_pi()", globals(), locals(), "Profile.prof")
s = pstats.Stats("Profile.prof")
s.strip_dirs().sort_stats("time").print_stats()
|