Skip to content

fix: benchmark stacked PRs against main and retain failure logs - #1002

Merged
dkovalenko-oai merged 3 commits into
mainfrom
perf/main-stack-baseline
Nov 10, 2026
Merged

dkovalenko-oai merged 3 commits into
mainfrom
perf/main-stack-baseline

Conversation

@dkovalenko-oai

@dkovalenko-oai dkovalenko-oai commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Benchmark stacked PRs against main

Pin the tip of main when planning each PR run. For a stack such as #958 on #954, measure the child's exact head against that pinned commit. Use the diff from the merge base with main for the core file filter so changes in the parent count. Keep the perf-check override.

Recover from build and reference failures

  • Retry Ubuntu package downloads when the hosted build sees a mirror sync error. The MCP run stopped before measuring. Failed build
  • Explain when the saved daily reference needs recalibration and use a separate issue title for measurement failures. The first reference run after Run the FFF reference directly on load #1000 stopped on a script checksum mismatch. Failed reference
  • Keep the benchmark console log with collected timings in fff-measurements for 30 days. Report build and measurement failures in the PR status. Use the report artifact ID for same-repository publication so a publisher-only retry can find the report.

Verification

  • Ran the plan against perf(core): batch index writes and limit retained search scores #958 and verified its pinned base was the current main SHA.
  • Checked stacked core changes, docs-only changes, the force label, and superseded heads with Git fixtures.
  • Checked current and older report routing, simulated Ubuntu mirror failures, and verified that measurement failures retain their exit status and log.
  • Ran workflow lint and shell syntax checks.

Summary by CodeRabbit

  • New Features
    • Pull request benchmarks can run against any target branch and compare changes with a snapshot of main.
    • Benchmark logs and timing results are retained for 30 days, including when measurements fail.
    • Benchmark reports identify build and measurement failures.
  • Bug Fixes
    • Reference measurements verify the benchmark script checksum before running and provide clearer failure details.
    • Package installation retries temporary failures before stopping.
    • Benchmark reports verify that pull request details match the workflow run.
  • Documentation
    • Updated benchmark guidance to explain comparisons for stacked pull requests, failure reporting, and retained results.

@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The performance workflows now accept PRs targeting any base branch, compare eligible changes with a revision from main, and capture benchmark logs and results. Report artifacts include PR and failure-stage metadata. The reference workflow validates its checksum and reports measurement failures.

Changes: Performance benchmark workflow

Layer / File(s) Summary
Benchmark selection and revision
.github/workflows/performance.yml, perf/build.sh, perf/README.md
The workflow checks changes against a revision from main and accepts PRs with any base branch. The build script selects seven named benchmarks and retries package installation. The README describes the comparison behavior.
Measurement capture and report artifact
.github/workflows/performance.yml, perf/README.md
The measurement job captures benchmark logs and uploads them with timing files. The report job records the PR number and failure stage, and exposes the uploaded artifact ID. The README documents artifact retention.
Report artifact verification and publishing
.github/workflows/performance-publish.yml
The publisher obtains the report artifact ID from its caller or locates it for a workflow run. It validates the PR head against the workflow-run source and distinguishes build failures from measurement failures.
Reference measurement failure reporting
.github/workflows/performance-reference.yml
The reference workflow verifies the saved checksum before measurement. It reports failures through issues and uploads logs and benchmark files after success or failure.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant PerformanceWorkflow
  participant BuildJob
  participant MeasureJob
  participant ReportArtifact
  participant PublishWorkflow
  PerformanceWorkflow->>BuildJob: Build benchmark binaries
  PerformanceWorkflow->>MeasureJob: Run benchmarks and capture logs
  MeasureJob->>ReportArtifact: Upload timings and benchmark log
  PerformanceWorkflow->>ReportArtifact: Upload PR number and failure stage
  PerformanceWorkflow->>PublishWorkflow: Pass report_artifact_id
Loading

Possibly related issues

  • dmtrKovalenko/fff#1001 — The PR changes reference-run failure reporting, which the issue also concerns.

Possibly related PRs

  • dmtrKovalenko/fff#1000 — This PR updates the performance workflow and report artifact flow introduced there.
  • dmtrKovalenko/fff#914 — This PR explicitly builds the fuzzy_search_bench benchmark added by that PR.

Suggested reviewers: dmtrkovalenko

Merge Risk: Minimal · up to ebf9a

The workflow changes show no identified blocker in benchmark selection or failure reporting, so the PR appears mergeable after normal CI checks.

Pre-merge checks: Passed 5

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly summarizes the main changes: benchmarking stacked PRs against main and retaining failure logs.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files. (2 skipped: 2 unsupported.)

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a4f3858d-4658-4393-98ee-a70bf4802635
Commits

Reviewing files that changed from the base of the PR and between b5fd75c and ebf9a75.

Files selected for processing: 2

  • .github/workflows/performance.yml
  • perf/README.md
Files skipped from review as they are similar to previous changes: 1

  • perf/README.md

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

@dkovalenko-oai dkovalenko-oai added the perf-check Request an FFF core performance benchmark label Nov 10, 2026
@dkovalenko-oai
dkovalenko-oai marked this pull request as ready for review November 10, 2026 14:49
@github-actions

Copy link
Copy Markdown
Contributor

🥼 FFF core performance

🔴 FFF core performance comparison failed

Base 9771025, PR b5fd75c

🔴 1 slower, 🟢 0 faster, ⚪ 72 within ±10%

Benchmark Base PR Change
🔴 core/bigram/bigram_build/short_content/10000 9.68 ms 12.04 ms +24.43%

PR time against base for every benchmark

🔬 All 73 Criterion timings
Benchmark Base PR Change
⚪ ext4/fff/fuzzy_search/fuzzy_search_repo/empty/no_current_file 7.10 µs 7.10 µs +0.03%
⚪ ext4/fff/fuzzy_search/fuzzy_search_repo/short/current_file 107.59 µs 106.73 µs -0.80%
⚪ ext4/fff/fuzzy_search/fuzzy_search_repo/path/no_current_file 520.77 µs 515.66 µs -0.98%
⚪ ext4/fff/fuzzy_search/fuzzy_search_repo/multipart/current_file 36.66 µs 36.65 µs -0.02%
⚪ ext4/fff/fuzzy_search/fuzzy_search_repo/extension/no_current_file 9.56 µs 9.49 µs -0.73%
⚪ ext4/fff/grep/grep_repo/plain_sensitive 11.17 ms 11.83 ms +5.93%
⚪ ext4/fff/grep/grep_repo/plain_insensitive 7.85 ms 7.77 ms -1.01%
⚪ ext4/fff/grep/grep_repo/plain_no_matches 11.10 ms 11.24 ms +1.20%
⚪ ext4/fff/grep/grep_repo/regex 11.41 ms 11.70 ms +2.51%
⚪ ext4/fff/grep/grep_repo/fuzzy_exact 6.23 ms 6.37 ms +2.16%
⚪ ext4/fff/grep/grep_repo/fuzzy_typo 6.21 ms 6.33 ms +2.07%
⚪ ext4/vscode/fuzzy_search/fuzzy_search_repo/empty/no_current_file 409.35 µs 409.74 µs +0.09%
⚪ ext4/vscode/fuzzy_search/fuzzy_search_repo/short/current_file 3.13 ms 3.16 ms +1.08%
⚪ ext4/vscode/fuzzy_search/fuzzy_search_repo/path/no_current_file 6.01 ms 6.13 ms +2.12%
⚪ ext4/vscode/fuzzy_search/fuzzy_search_repo/multipart/current_file 6.16 ms 6.09 ms -1.15%
⚪ ext4/vscode/fuzzy_search/fuzzy_search_repo/extension/no_current_file 123.52 µs 132.88 µs +7.58%
⚪ ext4/vscode/grep/grep_repo/plain_sensitive 8.62 ms 8.42 ms -2.26%
⚪ ext4/vscode/grep/grep_repo/plain_insensitive 8.43 ms 8.50 ms +0.81%
⚪ ext4/vscode/grep/grep_repo/plain_no_matches 110.04 ms 110.83 ms +0.72%
⚪ ext4/vscode/grep/grep_repo/regex 8.85 ms 9.03 ms +2.03%
⚪ ext4/vscode/grep/grep_repo/fuzzy_exact 8.58 ms 8.51 ms -0.83%
⚪ ext4/vscode/grep/grep_repo/fuzzy_typo 14.35 ms 13.64 ms -4.92%
⚪ btrfs/fff/fuzzy_search/fuzzy_search_repo/empty/no_current_file 7.16 µs 7.13 µs -0.42%
⚪ btrfs/fff/fuzzy_search/fuzzy_search_repo/short/current_file 104.90 µs 105.56 µs +0.62%
⚪ btrfs/fff/fuzzy_search/fuzzy_search_repo/path/no_current_file 514.58 µs 516.30 µs +0.34%
⚪ btrfs/fff/fuzzy_search/fuzzy_search_repo/multipart/current_file 40.44 µs 37.15 µs -8.12%
⚪ btrfs/fff/fuzzy_search/fuzzy_search_repo/extension/no_current_file 9.43 µs 9.45 µs +0.21%
⚪ btrfs/fff/grep/grep_repo/plain_sensitive 11.35 ms 11.52 ms +1.50%
⚪ btrfs/fff/grep/grep_repo/plain_insensitive 7.31 ms 7.51 ms +2.71%
⚪ btrfs/fff/grep/grep_repo/plain_no_matches 10.99 ms 11.10 ms +1.06%
⚪ btrfs/fff/grep/grep_repo/regex 11.51 ms 11.54 ms +0.26%
⚪ btrfs/fff/grep/grep_repo/fuzzy_exact 6.31 ms 6.35 ms +0.60%
⚪ btrfs/fff/grep/grep_repo/fuzzy_typo 6.34 ms 6.41 ms +1.17%
⚪ btrfs/vscode/fuzzy_search/fuzzy_search_repo/empty/no_current_file 398.67 µs 395.51 µs -0.79%
⚪ btrfs/vscode/fuzzy_search/fuzzy_search_repo/short/current_file 3.19 ms 3.23 ms +1.19%
⚪ btrfs/vscode/fuzzy_search/fuzzy_search_repo/path/no_current_file 6.12 ms 6.06 ms -0.89%
⚪ btrfs/vscode/fuzzy_search/fuzzy_search_repo/multipart/current_file 6.26 ms 6.19 ms -1.05%
⚪ btrfs/vscode/fuzzy_search/fuzzy_search_repo/extension/no_current_file 133.11 µs 126.99 µs -4.60%
⚪ btrfs/vscode/grep/grep_repo/plain_sensitive 18.58 ms 17.76 ms -4.39%
⚪ btrfs/vscode/grep/grep_repo/plain_insensitive 8.27 ms 8.44 ms +2.01%
⚪ btrfs/vscode/grep/grep_repo/plain_no_matches 105.20 ms 106.42 ms +1.16%
⚪ btrfs/vscode/grep/grep_repo/regex 18.62 ms 19.10 ms +2.62%
⚪ btrfs/vscode/grep/grep_repo/fuzzy_exact 11.84 ms 12.36 ms +4.41%
⚪ btrfs/vscode/grep/grep_repo/fuzzy_typo 11.91 ms 12.62 ms +6.04%
⚪ core/parse/realistic_queries/file 56 ns 56 ns +0.00%
⚪ core/parse/realistic_queries/test 56 ns 56 ns +0.00%
⚪ core/parse/realistic_queries/mod.rs 68 ns 68 ns +0.00%
⚪ core/parse/realistic_queries/src/*.rs 87 ns 86 ns -1.15%
⚪ core/parse/realistic_queries/lib_test 130 ns 130 ns +0.00%
⚪ core/parse/realistic_queries/*.rs_!test 150 ns 150 ns +0.00%
⚪ core/parse/realistic_queries/src/lib/*.rs 99 ns 99 ns +0.00%
⚪ core/parse/realistic_queries//src/_name 131 ns 132 ns +0.76%
⚪ core/parse/realistic_queries/status:modified_*.rs 175 ns 176 ns +0.57%
⚪ core/parse/realistic_queries/type:rust_test_!node_modules 288 ns 288 ns +0.00%
⚪ core/definition/definition/rust/mixed_256 7.44 µs 7.35 µs -1.25%
⚪ core/definition/definition/javascript/mixed_256 14.52 µs 14.39 µs -0.90%
⚪ core/definition/definition/python/mixed_256 5.45 µs 5.57 µs +2.13%
⚪ core/glob/glob_reuse_10k/recompile_each_time 98.85 µs 101.59 µs +2.77%
⚪ core/glob/glob_reuse_10k/reuse_compiled 99.57 µs 98.72 µs -0.85%
⚪ core/glob/glob_mixed_100k/prepass_bitmap/ext_1of10 1.24 ms 1.23 ms -0.27%
⚪ core/glob/glob_mixed_100k/inline_compiled/ext_1of10 298.59 µs 298.26 µs -0.11%
⚪ core/glob/glob_mixed_100k/prepass_bitmap/ext_4of10 1.58 ms 1.60 ms +1.20%
⚪ core/glob/glob_mixed_100k/inline_compiled/ext_4of10 843.34 µs 851.01 µs +0.91%
⚪ core/glob/glob_mixed_100k/prepass_bitmap/ext_8of10 1.90 ms 1.89 ms -0.78%
⚪ core/glob/glob_mixed_100k/inline_compiled/ext_8of10 1.53 ms 1.41 ms -7.48%
⚪ core/glob/glob_mixed_100k/prepass_bitmap/ext_all 1.97 ms 1.98 ms +0.59%
⚪ core/glob/glob_mixed_100k/inline_compiled/ext_all 1.63 ms 1.63 ms +0.12%
🔴 core/bigram/bigram_build/short_content/10000 9.68 ms 12.04 ms +24.43%
⚪ core/bigram/bigram_query_100000/long_14char 581 ns 581 ns +0.00%
⚪ core/bigram/bigram_query_100000/medium_6char 541 ns 543 ns +0.37%
⚪ core/bigram/bigram_query_100000/multi_word 559 ns 561 ns +0.36%
⚪ core/memmem/simd_string_utils_memmem/find/file_picker.rs/53KB/medium/miss 4.05 µs 4.03 µs -0.49%
⚪ core/memmem/simd_string_utils_memmem/find/file_picker.rs/53KB/long/miss 3.61 µs 3.63 µs +0.58%

🔗 Workflow run

@dkovalenko-oai dkovalenko-oai removed the perf-check Request an FFF core performance benchmark label Nov 10, 2026
@dkovalenko-oai
dkovalenko-oai merged commit 06d5e3f into main Nov 10, 2026
59 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant