You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| export |`POST /api/export` (ZIP) over 10 / 50 composer corpora (capped at 50 for CI runtime; parse goes to 200) |
21
+
| search |`GET /api/search` over a 50-composer corpus — **live-scan** (`test_search_full_corpus_live_scan`, `NO_SEARCH_INDEX=1`) and **FTS index** (`test_search_full_corpus_indexed`, pre-built index)|
Synthetic corpora are built in `tests/benchmarks/conftest.py` — no real Cursor storage dependency.
25
25
26
+
### Adding a benchmark group
27
+
28
+
Every `@pytest.mark.benchmark(group="...")` name must appear in `GATED_GROUPS` inside `scripts/reduce_baselines.py`. Otherwise `reduce_baselines.py` fails at refresh time with an unknown-group error. Update both the test marker and `GATED_GROUPS` when introducing a new group.
29
+
26
30
## CI gate
27
31
28
32
The `benchmarks` job on **ubuntu-latest** runs the full `tests/benchmarks/` suite (`--benchmark-json=benchmark-results.json`), then `scripts/check_benchmark_regression.py benchmark-results.json benchmarks/baselines.json`.
@@ -35,18 +39,22 @@ The `benchmarks` job on **ubuntu-latest** runs the full `tests/benchmarks/` suit
Sub-millisecond benches (e.g. `test_summary_cache_lookup`, `test_composer_map_cache_lookup`) can be high-variance on shared runners. If the gate becomes flaky, raise `--slack` for those entries or reintroduce targeted exclusions in `EXCLUDED_FROM_GATE`.
43
+
38
44
## Refresh baselines
39
45
40
46
After intentional performance work, capture on **ubuntu-latest** (same OS as the gated CI job). Download `benchmark-results.json` from a CI artifact when possible:
For a quick local snapshot only (may not match CI timings):
47
53
48
54
```bash
49
55
make seed-baselines-local
56
+
# writes benchmarks/_raw.json only; does not overwrite benchmarks/baselines.json
57
+
make seed-baselines-local FORCE=1 # also runs reduce_baselines into benchmarks/baselines.json
50
58
```
51
59
52
60
`make update-baselines` is a deprecated alias for `seed-baselines-local`. Do not commit baselines from macOS/Windows unless you accept cross-OS gate skew.
@@ -56,5 +64,5 @@ make seed-baselines-local
56
64
| Target | Purpose |
57
65
|--------|---------|
58
66
|`make check-benchmarks`| Run suite + regression gate locally |
59
-
|`make seed-baselines-local`| Capture local timings into`benchmarks/baselines.json` (with slack) |
67
+
|`make seed-baselines-local`| Capture local timings to`benchmarks/_raw.json` (use `FORCE=1` to update `baselines.json`) |
60
68
|`make clean-benchmark-artifacts`| Remove `benchmark-results.json` and `benchmarks/_raw.json`|
Copy file name to clipboardExpand all lines: benchmarks/baselines.json
+6-3Lines changed: 6 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"_note": "Gated means from ubuntu-latest CI benchmark-results.json. Values multiplied by 1.5x slack at generation time. Refresh after intentional speedups via reduce_baselines.py.",
0 commit comments