Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tests with default workers per core set to 1 #4

Merged
merged 2 commits into from
Mar 4, 2019

Conversation

tiangolo
Copy link
Owner

@tiangolo tiangolo commented Mar 4, 2019

✅ Update tests with default workers per core set to 1.

Depends on tiangolo/uvicorn-gunicorn-docker#5

@tiangolo tiangolo merged commit 69e00e2 into master Mar 4, 2019
@tiangolo tiangolo deleted the default-workers-per-core-1 branch March 4, 2019 14:35
br3ndonland added a commit to br3ndonland/inboard that referenced this pull request Sep 20, 2020
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant