I have a python program that is running for many days. Memory usage does not increase by very much, however the program becomes slower and slower. Is there a tool or utility that will list all function calls and how long they take to complete? Something like guppy/heapy but for CPU usage.
Share
Edit2
I just saw your actual question is answered as in ‘How can you profile a Python script?‘
Sure, use profile.py.
see also profilers and tips on performance.
Edit:
Above example is for one function.
You can profile and run your script from the commandline with cProfile with:
Your program/script could look also like the following for profiling always when run: