框架与类库:FastAPI
How to profile a FastAPI asynchronous request
I have been experimenting with FastAPI recently, a Python API framework self-describing as "high performance, easy to learn, fast to code, ready for production".
One of the features I wanted my project to have is to be fully asynchronous, from the app server to the SQL requests. As the API is mostly I/O bound, this would allow it to handle many concurrent requests with a single server process, instead of starting a thread per request, as one commony seen with Flask/Gunicorn.
However, this poses a challenge when it comes to profiling the code and interpreting the results.
- «
- 1
- »