In my python program i have used a lot of modules and am trying to have a count of the functions called and the call chains involved. Is there a tool/module in python which will provide me with these statistics.
I've used this. It didn't work for my purposes since my app has many threads running at once and and I ended up with 12000 links and graphviz couldn't compile it. But it worked when I ran it on a single thread.
http://pycallgraph.slowchop.com/
pydoc -k profile
will give you a list of what's on your system. I've used profile and cProfile.
It's as easy as:
if __name__ == '__main__':
if PROFILING:
import cProfile
cProfile.run("main()")
else:
main()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With