I have never done code coverage in Python, but I'm looking for something like GCC gcov , which tells me how many times each line is executed, or Apple Shark, which gives a hierarchical breakdown of how long each function takes.
My problem is that I have a live server that is experiencing high load, and I canβt tell from the logs what causes it. I would like to attach something to a Django instance to control which lines are the hottest and / or which functions take the longest time.
This is something like, but not quite, code coverage. I would like to introduce it on a server running live, preferably without changing too much.
Ideas?
source share