mirror of
https://github.com/emmett-framework/granian.git
synced 2025-12-23 05:36:49 +00:00
157 lines
4 KiB
YAML
157 lines
4 KiB
YAML
name: benchmarks
|
|
|
|
on: workflow_dispatch
|
|
|
|
env:
|
|
MATURIN_VERSION: 0.14.17
|
|
|
|
jobs:
|
|
benchmark-base:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '3.10'
|
|
- uses: messense/maturin-action@v1
|
|
with:
|
|
maturin-version: v${{ env.MATURIN_VERSION }}
|
|
command: build
|
|
args: --release --strip --interpreter python3.10
|
|
target: x64
|
|
manylinux: auto
|
|
container: off
|
|
- name: Deps
|
|
run: |
|
|
export _whl=$(ls target/wheels/granian-*.whl)
|
|
pip install $_whl
|
|
- name: wrk
|
|
run: |
|
|
git clone https://github.com/wg/wrk.git .wrk
|
|
cd .wrk && make && sudo mv wrk /usr/local/bin
|
|
- name: Benchmarks
|
|
run: |
|
|
cd benchmarks && python benchmarks.py
|
|
- name: Upload results
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: results-base
|
|
path: benchmarks/results/*
|
|
|
|
benchmark-concurrency:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '3.10'
|
|
- uses: messense/maturin-action@v1
|
|
with:
|
|
maturin-version: v${{ env.MATURIN_VERSION }}
|
|
command: build
|
|
args: --release --strip --interpreter python3.10
|
|
target: x64
|
|
manylinux: auto
|
|
container: off
|
|
- name: Deps
|
|
run: |
|
|
export _whl=$(ls target/wheels/granian-*.whl)
|
|
pip install $_whl
|
|
- name: wrk
|
|
run: |
|
|
git clone https://github.com/wg/wrk.git .wrk
|
|
cd .wrk && make && sudo mv wrk /usr/local/bin
|
|
- name: Benchmarks
|
|
env:
|
|
BENCHMARK_BASE: false
|
|
BENCHMARK_CONCURRENCIES: true
|
|
run: |
|
|
cd benchmarks && python benchmarks.py
|
|
- name: Upload results
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: results-concurrency
|
|
path: benchmarks/results/*
|
|
|
|
benchmark-vsa:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '3.10'
|
|
- uses: messense/maturin-action@v1
|
|
with:
|
|
maturin-version: v${{ env.MATURIN_VERSION }}
|
|
command: build
|
|
args: --release --strip --interpreter python3.10
|
|
target: x64
|
|
manylinux: auto
|
|
container: off
|
|
- name: Deps
|
|
run: |
|
|
export _whl=$(ls target/wheels/granian-*.whl)
|
|
pip install $_whl
|
|
pip install uvicorn
|
|
pip install httptools
|
|
pip install hypercorn
|
|
- name: wrk
|
|
run: |
|
|
git clone https://github.com/wg/wrk.git .wrk
|
|
cd .wrk && make && sudo mv wrk /usr/local/bin
|
|
- name: Benchmarks
|
|
env:
|
|
BENCHMARK_BASE: false
|
|
BENCHMARK_VSA: true
|
|
run: |
|
|
cd benchmarks && python benchmarks.py
|
|
- name: Upload results
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: results-vsa
|
|
path: benchmarks/results/*
|
|
|
|
benchmark-vss:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '3.9'
|
|
- uses: messense/maturin-action@v1
|
|
with:
|
|
maturin-version: v${{ env.MATURIN_VERSION }}
|
|
command: build
|
|
args: --release --strip --interpreter python3.9
|
|
target: x64
|
|
manylinux: auto
|
|
container: off
|
|
- name: Deps
|
|
run: |
|
|
export _whl=$(ls target/wheels/granian-*.whl)
|
|
pip install $_whl
|
|
pip install gunicorn
|
|
pip install meinheld
|
|
- name: wrk
|
|
run: |
|
|
git clone https://github.com/wg/wrk.git .wrk
|
|
cd .wrk && make && sudo mv wrk /usr/local/bin
|
|
- name: Benchmarks
|
|
env:
|
|
BENCHMARK_BASE: false
|
|
BENCHMARK_VSS: true
|
|
run: |
|
|
cd benchmarks && python benchmarks.py
|
|
- name: Upload results
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: results-vss
|
|
path: benchmarks/results/*
|