News for hackers. Stuff that matters.
Re:Show HN: Austin-Tui – Spy inside a running Python program... by jvns on Tuesday October 27, 2020 @08:21AM (#24906694)
Also, this kind of profiler is great because you can use it on any running Python program, which is pretty magical and very useful. (especially when it's an application you didn't write)

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.

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.