Skip to content

Large query handling for SQLGraph #695

Large query handling for SQLGraph

Large query handling for SQLGraph #695

Workflow file for this run

name: Benchmarks
on:
pull_request:
branches: [ main ]
jobs:
benchmark:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.ref }}
- name: Fetch main branch
run: git fetch origin main
- name: Create local main branch for ASV
run: |
# Create local 'main' if it doesn't exist
if ! git show-ref --verify --quiet refs/heads/main; then
git branch main origin/main
fi
# Sanity check
git rev-parse main
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install benchmarking tooling
run: |
python -m pip install --upgrade pip
python -m pip install asv virtualenv
- name: Cache ASV environments
uses: actions/cache@v4
with:
path: .asv/env
key: asv-env-${{ runner.os }}-py312-${{ hashFiles('pyproject.toml', 'asv.conf.json') }}
restore-keys: |
asv-env-${{ runner.os }}-py312-
- name: Register ASV machine profile
run: |
asv machine \
--yes \
--machine github-actions \
- name: Run ASV continuous benchmarks
id: asv
run: |
set -o pipefail
status=0
asv continuous origin/main HEAD \
--quick \
--machine github-actions \
--python 3.12 \
--factor 1.5 \
--attribute timeout=180 \
--show-stderr || status=$?
if [ "$status" -eq 2 ]; then
echo "asv: benchmark run failed (exit 2). Failing CI." >&2
exit 2
fi
if [ "$status" -eq 1 ]; then
echo "asv: performance regression detected (ignored for CI)." >&2
fi
asv compare origin/main HEAD > asv-summary.txt
{
echo 'summary<<EOF'
cat asv-summary.txt
echo EOF
} >> "$GITHUB_OUTPUT"
- name: Append benchmark summary
run: |
echo '### ASV Continuous Results' >> $GITHUB_STEP_SUMMARY
cat asv-summary.txt >> $GITHUB_STEP_SUMMARY