-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (72 loc) · 3.19 KB
/
Copy pathload-test.yml
File metadata and controls
80 lines (72 loc) · 3.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Load Test
on:
pull_request:
paths:
- "src/**"
- "tests/load/**"
- "scripts/check_performance.py"
- "docs/benchmark-baseline.json"
push:
branches: [main]
paths-ignore:
- ".github/perf-history.json"
workflow_dispatch:
permissions:
contents: read
jobs:
load-test:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.11"
- name: Install dependencies
run: pip install -e ".[load,cloud]"
- name: Run p99 CI smoke load gate
shell: bash
env:
# DuckDB-profile perf gate: baselines in docs/benchmark-baseline.json were
# measured 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/load/agentflow-load.duckdb
AGENTFLOW_API_KEYS: af-prod-agent-support-abc123:Support Agent,af-prod-agent-ops-def456:Ops Agent,af-prod-agent-rate-e2e000:Rate Limit Agent
AGENTFLOW_USAGE_DB_PATH: .artifacts/load/agentflow-api-usage.duckdb
AGENTFLOW_WEBHOOKS_FILE: .artifacts/load/webhooks.yaml
AGENTFLOW_LOAD_API_KEY: af-prod-agent-ops-def456
AGENTFLOW_RATE_LIMIT_RPM: "600000"
AGENTFLOW_LOAD_HEALTH_CHECK_WEIGHT: "0"
AGENTFLOW_LOAD_USERS: "15"
AGENTFLOW_LOAD_SPAWN_RATE: "5"
OTEL_SDK_DISABLED: "true"
PYTHONUNBUFFERED: "1"
run: |
set -euo pipefail
mkdir -p .artifacts/load
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 8011 > .artifacts/load/api.log 2>&1 &
api_pid=$!
trap 'kill "$api_pid"' EXIT
python scripts/wait_for_services.py --url http://127.0.0.1:8011 --timeout 120
python tests/load/run_load_test.py \
--host http://127.0.0.1:8011 \
--stats-prefix .artifacts/load/results \
--results-json .artifacts/load/results.json
- name: Check CI-runner baseline regression
run: python scripts/check_performance.py --baseline docs/benchmark-baseline.json --current .artifacts/load/results.json --max-regress 50
- name: Upload load-test artifacts
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: load-test-results
# Exclude the live DuckDB files: their .wal sidecar is checkpointed away
# asynchronously, so it can vanish between upload-artifact's file scan and
# the zip step, failing the job with ENOENT on `*.duckdb.wal`. The DBs are
# runtime state, not useful debug output (results.json / stats / api.log
# are). This makes the step deterministic instead of racing the checkpoint.
path: |
.artifacts/load/
!.artifacts/load/*.duckdb
!.artifacts/load/*.duckdb.*