Commit f6c0289
authored
ci: run pre-publish benchmark gate on every PR (#1072)
* ci: run pre-publish benchmark gate on every PR
Mirrors the regression gate from publish.yml so PRs catch performance
regressions before merge instead of at release time. The gate measures
the PR-built native artifact as version "dev", appends to the benchmark
history files in-job, and fails if any metric regresses beyond threshold
vs the most recent release baseline.
Reuses the existing native-host-build artifact (linux-x64), runs in
parallel with the rest of CI, and preserves CODEGRAPH_FAST_SKIP_DIAG
so fast-skip rejection reasons surface in CI logs when issues happen.
JSON results upload on always() for post-failure debugging.
* test(bench): mark 3.9.6 incremental Full build as known regression (#1072)
The benchmark regression guard fails on the same root cause as the
existing 3.9.6 known regressions ('Build ms/file', 'No-op rebuild'):
PR #1016 expanded AST_TYPE_MAPS from 3 to 23 languages, causing
zero-AST-row files to return astNodes: undefined and trigger a
full-corpus re-parse. The regression shows up in INCREMENTAL-BENCHMARKS
under the 'Full build' label as well, which was missed when PR #1038
added the other 3.9.6 entries.
Both engines regressed: native 2148 -> 2986 (+39%), wasm 7563 -> 14036
(+86%). Fixed by PR #1038; reclears with v3.9.7+ benchmark data.
Refs #1036, #1037, #1038.
* ci: scope benchmark gate to PRs and add per-step timeouts (#1072)
Address Greptile review feedback:
- Add 'if: github.event_name == "pull_request"' to skip the gate on
push-to-main. The merged PR already passed the gate on this same
diff, so re-running on the merge commit doubles CI minutes per
landed change with no new signal. Mirrors publish.yml's
'if: github.event_name != "push"' skip.
- Add per-step 'timeout-minutes: 20' to the four benchmark execution
steps (build/resolution/query/incremental). Without explicit
timeouts, a hung script would hold the runner for the GitHub default
(6 hours), blocking the ci-pipeline gate for the entire duration.
* fix(bench): bypass version-gap check when latest is 'dev' (#1072)
parseSemver('dev') returns null, so effectiveGap('dev', anyRelease) is
Infinity — the > MAX_VERSION_GAP check silently rejected every dev →
release pairing and findLatestPair fell through to compare the two most
recent real releases. The per-PR regression gate was running on static
historical data instead of the PR's own dev numbers.
Bypass the gap check when latestVersion === 'dev' so dev is always
compared against the most recent comparable release. Real releases
still respect MAX_VERSION_GAP to avoid stale baselines.
* fix(bench): look up KNOWN_REGRESSIONS by baseline version when latest is dev (#1072)
KNOWN_REGRESSIONS keys are anchored to the release where the regression
was first observed (e.g. '3.9.6:No-op rebuild'). When the per-PR gate
runs 'dev' as latest, lookups using 'dev:Foo' never match — defeating
the exemption mechanism for every documented regression.
Fall back to the baseline (previous) version's key when latest is 'dev',
so a single '3.9.6:Foo' entry covers both '3.9.6 vs 3.9.5' (release-time)
and 'dev vs 3.9.6' (per-PR) until the next release clears the regression
and the entry is pruned by the existing stale-entry test.
* test(bench): mark 3.9.6 1-file rebuild as known regression (#1072)
The native 1-file rebuild regressed from 78ms to ~116ms (build) and 54ms
to ~81ms (incremental) when #1069 made backfillNativeDroppedFiles run on
every successful orchestrator pass — including incrementals — to repair
file_hashes/nodes rows for unsupported-extension files. #1070 fixed the
orchestrator side, but the JS-side call stayed unconditional, wasting
~45ms per incremental on the codegraph corpus.
Fix is tracked in PR #1082, which gates the backfill call on
`isFullBuild || removedCount > 0`. Adding the known-regression entry
lets this PR's gate pass while #1082 ships through review; the existing
stale-entry test will warn once 3.9.7 lands and the entry stays past
its useful life.
* fix(bench): cover import resolution in per-PR gate
The resolveEntries filter excluded 'dev' from the candidate pool, so
nativeBatchMs / jsFallbackMs regressions introduced by a PR would
silently pass the gate. Switch to findLatestPair (which already pairs
dev → most-recent comparable release) so the import-resolution
sub-benchmark gets the same per-PR coverage as the rest of the gate.
* test(bench): mark 3.10.0 fnDeps depth 1 as known regression
CI run 25708925467 surfaced fnDeps depth 1 at 24.7 → 44.9ms (+82%) on
the per-PR gate, above the 50% NOISY_METRIC_THRESHOLD. The fn_deps Rust
implementation and JS wrapper are byte-for-byte unchanged since v3.9.6
(already documented in the NOISY_METRICS docstring); the ~20ms absolute
delta is the shared-runner noise floor on a sub-30ms baseline.
Same pattern as the existing 3.10.0:No-op rebuild / 3.10.0:1-file rebuild
entries; remove once 3.11.0+ data confirms stabilization under the
warmup + 5-sample methodology.1 parent 592e23b commit f6c0289
2 files changed
Lines changed: 244 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
298 | 451 | | |
299 | 452 | | |
300 | | - | |
| 453 | + | |
301 | 454 | | |
302 | 455 | | |
303 | 456 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
104 | | - | |
105 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
106 | 115 | | |
107 | 116 | | |
108 | 117 | | |
| |||
146 | 155 | | |
147 | 156 | | |
148 | 157 | | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
149 | 169 | | |
150 | 170 | | |
151 | 171 | | |
| |||
155 | 175 | | |
156 | 176 | | |
157 | 177 | | |
| 178 | + | |
158 | 179 | | |
159 | 180 | | |
160 | 181 | | |
| |||
272 | 293 | | |
273 | 294 | | |
274 | 295 | | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
275 | 303 | | |
276 | 304 | | |
277 | 305 | | |
| |||
284 | 312 | | |
285 | 313 | | |
286 | 314 | | |
287 | | - | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
288 | 319 | | |
289 | 320 | | |
290 | 321 | | |
| |||
329 | 360 | | |
330 | 361 | | |
331 | 362 | | |
332 | | - | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
333 | 368 | | |
334 | 369 | | |
335 | 370 | | |
336 | 371 | | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
337 | 384 | | |
338 | 385 | | |
339 | 386 | | |
| |||
493 | 540 | | |
494 | 541 | | |
495 | 542 | | |
| 543 | + | |
496 | 544 | | |
497 | 545 | | |
498 | 546 | | |
| |||
530 | 578 | | |
531 | 579 | | |
532 | 580 | | |
| 581 | + | |
533 | 582 | | |
534 | 583 | | |
535 | 584 | | |
| |||
559 | 608 | | |
560 | 609 | | |
561 | 610 | | |
| 611 | + | |
562 | 612 | | |
563 | 613 | | |
564 | 614 | | |
565 | 615 | | |
566 | | - | |
567 | | - | |
568 | | - | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
569 | 623 | | |
570 | | - | |
571 | | - | |
572 | | - | |
573 | | - | |
574 | | - | |
575 | | - | |
576 | | - | |
577 | | - | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
578 | 637 | | |
579 | 638 | | |
580 | 639 | | |
| |||
589 | 648 | | |
590 | 649 | | |
591 | 650 | | |
592 | | - | |
593 | | - | |
| 651 | + | |
| 652 | + | |
594 | 653 | | |
595 | 654 | | |
596 | 655 | | |
| |||
644 | 703 | | |
645 | 704 | | |
646 | 705 | | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
647 | 711 | | |
648 | 712 | | |
649 | 713 | | |
650 | | - | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
651 | 718 | | |
652 | 719 | | |
653 | 720 | | |
| |||
657 | 724 | | |
658 | 725 | | |
659 | 726 | | |
660 | | - | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
661 | 731 | | |
662 | 732 | | |
663 | 733 | | |
| |||
0 commit comments