feat(serving): PostgresControlPlaneStore — the scale profile ships (ADR 0010 slice 5) #240
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Performance Regression | |
| on: | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| jobs: | |
| perf-smoke: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 25 | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 | |
| with: | |
| python-version: "3.11" | |
| - name: Install dependencies | |
| run: pip install -e ".[dev,load,cloud]" | |
| - name: Run entity perf smoke gate | |
| shell: bash | |
| env: | |
| # DuckDB-profile perf gate: the 500 ms p99 threshold was calibrated on the | |
| # embedded engine. The shipped ClickHouse path is exercised by the E2E | |
| # workflow's ClickHouse lane, not by this latency gate. | |
| SERVING_BACKEND: duckdb | |
| DUCKDB_PATH: .artifacts/perf-smoke/agentflow-perf.duckdb | |
| AGENTFLOW_USAGE_DB_PATH: .artifacts/perf-smoke/agentflow-api-usage.duckdb | |
| AGENTFLOW_AUTH_DISABLED: "true" | |
| AGENTFLOW_API_KEYS: "" | |
| AGENTFLOW_API_KEYS_FILE: "" | |
| AGENTFLOW_ADMIN_KEY: "" | |
| REDIS_URL: redis://localhost:6379 | |
| OTEL_SDK_DISABLED: "true" | |
| PYTHONUNBUFFERED: "1" | |
| run: | | |
| set -euo pipefail | |
| mkdir -p .artifacts/perf-smoke docs/perf | |
| docker compose up -d --wait redis | |
| python tests/load/run_load_test.py --duckdb-path "$DUCKDB_PATH" --seed-data --seed-only | |
| python -m uvicorn src.serving.api.main:app --host 127.0.0.1 --port 8012 > .artifacts/perf-smoke/api.log 2>&1 & | |
| api_pid=$! | |
| trap 'kill "$api_pid" 2>/dev/null || true; docker compose stop redis >/dev/null 2>&1 || true' EXIT | |
| python scripts/wait_for_services.py --url http://127.0.0.1:8012 --timeout 120 | |
| python scripts/profile_entity.py \ | |
| --host http://127.0.0.1:8012 \ | |
| --entity-type order \ | |
| --entity-id ORD-20260404-1001 \ | |
| --iterations 2000 \ | |
| --concurrency 16 \ | |
| --output docs/perf/ci-smoke-latest.json | |
| python - <<'PY' | |
| import json | |
| from pathlib import Path | |
| payload = json.loads(Path("docs/perf/ci-smoke-latest.json").read_text(encoding="utf-8")) | |
| p99_ms = float(payload["p99_ms"]) | |
| if p99_ms > 500: | |
| raise SystemExit(f"p99_ms {p99_ms:.1f} exceeds perf-smoke gate 500 ms") | |
| print(f"p99_ms {p99_ms:.1f} is within perf-smoke gate 500 ms") | |
| PY | |
| - name: Upload performance artifacts | |
| if: always() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: perf-smoke-results | |
| path: | | |
| .artifacts/perf-smoke/ | |
| docs/perf/ci-smoke-latest.json |