Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/perf-smoke.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: perf-smoke

# Opt-in smoke for Criterion + short wrk (issue #110). Not part of default PR CI.
on:
workflow_dispatch:
schedule:
- cron: "0 6 * * 1" # Mondays 06:00 UTC

jobs:
criterion:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: astral-sh/setup-uv@v4
with:
enable-cache: true
- name: Sync + Criterion smoke
run: |
uv sync --frozen --extra dev
# Quiet, short Criterion run (still builds the bench binary).
cargo bench --bench hot_path -- --sample-size 10 --warm-up-time 1 --measurement-time 2

wrk-scenarios:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: astral-sh/setup-uv@v4
with:
enable-cache: true
- name: Install wrk
run: sudo apt-get update && sudo apt-get install -y wrk
- name: Build oxyroute and run short scenarios
run: |
set -euo pipefail
uv sync --frozen --extra dev --extra bench
rm -f target/wheels/oxyroute-*.whl
uv run maturin build --release
shopt -s nullglob
wheels=(target/wheels/oxyroute-*.whl)
shopt -u nullglob
uv pip install --force-reinstall "${wheels[0]}"
chmod +x perf-test/bench_scenarios.sh
OXYROUTE_BENCH_DURATION=1s OXYROUTE_BENCH_CONNECTIONS=8 OXYROUTE_BENCH_THREADS=1 \
./perf-test/bench_scenarios.sh
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
- Granian-compatible lifespan: sync `__rsgi_init__(loop)` / `__rsgi_del__(loop)` run
`on_startup` / `on_shutdown` via `loop.run_until_complete`. Prefer overriding
`on_startup` / `on_shutdown` instead of async `__rsgi_init__`.
- Criterion microbenchmarks (`cargo bench --bench hot_path`) and expanded wrk scenarios
(`perf-test/bench_scenarios.sh`); optional `perf-smoke` workflow
([#110](https://github.com/QueryaHub/OxyRoute/issues/110)).

### Changed

Expand Down
Loading
Loading