generated from br3ndonland/template-python
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve Gunicorn performance auto-tuning
tiangolo/uvicorn-gunicorn-docker#5 tiangolo/uvicorn-gunicorn-starlette-docker#4 tiangolo/uvicorn-gunicorn-fastapi-docker#6 The "auto-tuning" advertised in tiangolo/uvicorn-gunicorn-docker is basically a few lines of the `gunicorn_conf.py` that determine the number of Gunicorn workers to run. It would be helpful to write some unit test cases for this feature, but without being in a separate unit, it is difficult to unit test in isolation. This commit will refactor the performance auto-tuning into a function, `gunicorn_conf.calculate_workers`, and will add unit test cases to verify the resulting number of worker processes.
- Loading branch information
1 parent
9ddbc4b
commit 02b249e
Showing
2 changed files
with
84 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters