2 points · by behnamoh · 4y ago · 2 comments
https://pypi.org/project/viztracer/
python3 viztracer my_script.py arg1 arg2
Then when you exit, it'll do some processing and tell you exactly the vizviewer command you need to run. It opens a webgui and you can drill in to see which of your functions are taking too long. Then you know what you need to optimize.