Re:Show HN: Austin-Tui – Spy inside a running Python program...
by p403n1x87 on Tuesday October 27, 2020 @08:27AM
(#24906731)
For these kind of things one could use
https://github.com/P403n1x87/austin-python
An early attempt at an APM that was specifically designed to measure endpoint response times was here
https://github.com/P403n1x87/austin/blob/apm/austin/apm.py
The problem with statistical profilers is that they might fail to catch every single call, especially when they are fast.
But it's not right for every use case: by design austin/py-spy can only really profile the whole program, and if you want to profile a specific function or endpoint in your program, something like PyInstrument https://github.com/joerick/pyinstrument (which includes Django middlewares & Flask decorators) is a lot more useful.