Skip to content

Commit

Permalink
Merge branch 'main' into KissPeter-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
KissPeter committed Jan 9, 2024
2 parents d528e5e + 8c8f0d6 commit 6d14d6c
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 26 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/enable-auto-merge.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Enable auto merge

on:
pull_request

permissions:
contents: write
pull-requests: write

jobs:
autoupdate:
runs-on: ubuntu-latest
steps:
- name: Enable automerge
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}

28 changes: 14 additions & 14 deletions .github/workflows/performance_tuning_measurements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,22 @@ jobs:
if [ -f test_files/requirements.txt ]; then pip install -r test_files/requirements.txt; fi
mkdir -p reports
docker-compose ps --all
- name: 'Measure middlewares'
run: ./bin/run_test.sh middlewares
# - name: 'Measure middlewares'
# run: ./bin/run_test.sh middlewares
# - name: 'Measure sync vs async endpoints'
# run: ./bin/run_test.sh sync_async
# - name: 'Measure json response classes'
# run: ./bin/run_test.sh json_classes
- name: 'Measure Nginx port vs socket'
run: ./bin/run_test.sh nginx_port_vs_socket
- name: 'Measure Gunicorn vs Uvicorn'
run: ./bin/run_test.sh gunicorn_vs_uvicorn
- name: 'Nginx socker vs socket + keepalive'
run: ./bin/run_test.sh nginx_socker_keepalive
- uses: actions/upload-artifact@v2
with:
name: Pytest-Report-${{ matrix.python-version }}
path: ./reports
# - name: 'Measure Nginx port vs socket'
# run: ./bin/run_test.sh nginx_port_vs_socket
# - name: 'Measure Gunicorn vs Uvicorn'
# run: ./bin/run_test.sh gunicorn_vs_uvicorn
# - name: 'Nginx socker vs socket + keepalive'
# run: ./bin/run_test.sh nginx_socker_keepalive
# - uses: actions/upload-artifact@v2
# with:
# name: Pytest-Report-${{ matrix.python-version }}
# path: ./reports
workers_and_threads:
runs-on: ${{ matrix.os }}
timeout-minutes: 300
Expand Down Expand Up @@ -80,8 +80,8 @@ jobs:
if [ -f test_files/requirements.txt ]; then pip install -r test_files/requirements.txt; fi
mkdir -p reports test_files/svg
docker-compose ps --all
- name: 'Measure workers and threads'
run: ./bin/run_test.sh workers_and_threads
# - name: 'Measure workers and threads'
# run: ./bin/run_test.sh workers_and_threads
- uses: actions/upload-artifact@v3
with:
name: Pytest-Report-${{ matrix.python-version }}
Expand Down
12 changes: 1 addition & 11 deletions .github/workflows/update-branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,11 @@ name: Update branch

on:
pull_request

permissions:
contents: write
pull-requests: write

jobs:
autoupdate:
runs-on: ubuntu-latest
steps:
- name: Enable automerge on dependabot PRs
uses: daneden/enable-automerge-action@v1
with:
github-token: ${{ secrets.WORKFLOW_TOKEN }}
# Allowed values: MERGE | SQUASH | REBASE
# Defaults to MERGE
merge-method: MERGE
- name: "Update PR Branch"
uses: adRise/[email protected]
with:
Expand All @@ -28,3 +17,4 @@ jobs:
sort: 'created'
direction: 'desc'
require_auto_merge_enabled: true

2 changes: 1 addition & 1 deletion workers_and_threads.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ filename: workers_and_threads.md

Not strictly FastAPI performance tuning, but performance improvement on runner environment naturally helps for the system. [Gunicorn](https://gunicorn.org/) is one straightforward option to run FastAPI in [production](https://www.uvicorn.org/deployment/#gunicorn) environment
For high performance low latency, cheap, robust and reliable services it is important to get the maximum out of a single computing unit. In this example we will focus on a container with only 2 CPU cores allocated.
This is typically used and GitHub Action container has two CPU cores allocated where [these](https://kisspeter.github.io/fastapi-performance-optimization/#test-environment) measurements were executed.
This is typically used and GitHub Action container has two CPU cores allocated where [these](https://kisspeter.github.io/fastapi-performance-optimization/#test-environment) measurements were executed.

## Gunicorn

Expand Down

0 comments on commit 6d14d6c

Please sign in to comment.