I know cProfile can be used like this
python -m cProfile script.py
But suppose I have a packaged application (pip-installable) with an entry_point defined in setup.py, such that I can call the application from the terminal, without explicitly using any .py file. How can I use cProfile in that case?
I found the answer in this thread:
python -m cProfile $(which application)
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