Skip to content

fix(ci): publish benchmark delta reports#75

Merged
polaz merged 3 commits intomainfrom
fix/bench-pages-delta-reports-pr
Apr 6, 2026
Merged

fix(ci): publish benchmark delta reports#75
polaz merged 3 commits intomainfrom
fix/bench-pages-delta-reports-pr

Conversation

@polaz
Copy link
Copy Markdown
Member

@polaz polaz commented Apr 6, 2026

Summary

  • make benchmark parsing non-fatal when REPORT_DICT_TRAIN rows are absent, while keeping ratio/memory sections strict
  • emit explicit _n/a_ placeholder rows in benchmark-report.md when dictionary sections have no rows
  • publish benchmark-report.md, benchmark-delta.json, and benchmark-delta.md to gh-pages/dev/bench on main pushes
  • add direct README links to published benchmark delta/full reports

Validation

  • cargo build -p structured-zstd --features hash,std,dict_builder
  • cargo nextest run --profile ci -p structured-zstd --features hash,std,dict_builder
  • cargo test --doc -p structured-zstd --features hash,std,dict_builder

Related #56

Summary by CodeRabbit

  • New Features

    • Benchmark reports are now automatically published to GitHub Pages for main-branch pushes when available.
  • Bug Fixes

    • Benchmark tables for empty dictionary datasets now show a single "n/a" placeholder row instead of leaving tables blank.
  • Documentation

    • Added links to the latest benchmark delta and full benchmark reports in the Benchmarks Dashboard section of the README.

- make run-benchmarks tolerate missing REPORT_DICT_TRAIN rows\n- keep benchmark report sections explicit with n/a placeholders\n- publish benchmark-report and benchmark-delta artifacts to gh-pages/dev/bench\n- add direct README links to published delta/full reports
Copilot AI review requested due to automatic review settings April 6, 2026 14:15
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates CI benchmark reporting so runs that omit dictionary-training output still produce publishable reports, and publishes the latest benchmark delta/full reports to GitHub Pages (with README links).

Changes:

  • Make the benchmark parser non-fatal when REPORT_DICT_TRAIN lines are missing, and keep dictionary sections explicit via placeholder rows.
  • Publish benchmark-report.md, benchmark-delta.md, and benchmark-delta.json to gh-pages under dev/bench/.
  • Add README links to the published “latest” benchmark delta and full reports.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
README.md Adds links to the latest published benchmark delta/full reports on GitHub Pages.
.github/workflows/ci.yml Checks out gh-pages on main pushes and commits/pushes the generated benchmark report artifacts.
.github/scripts/run-benchmarks.sh Makes dict-train parsing non-fatal and emits placeholder rows when dictionary sections are missing.

Comment thread .github/scripts/run-benchmarks.sh Outdated
Comment thread .github/workflows/ci.yml Outdated
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 6, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: eaf8142c-0284-431c-b15a-9a1fde712809

📥 Commits

Reviewing files that changed from the base of the PR and between 0f011dd and ce3624a.

📒 Files selected for processing (1)
  • .github/scripts/run-benchmarks.sh

📝 Walkthrough

Walkthrough

Benchmark script now warns (does not exit) on missing dictionary-training rows and inserts _n/a_ placeholder rows into empty dictionary tables in generated markdown. CI workflow copies benchmark artifacts to the gh-pages branch under dev/bench/ on pushes to main. README links to those published reports were added.

Changes

Cohort / File(s) Summary
Benchmark Script Parsing
.github/scripts/run-benchmarks.sh
Switched dictionary_training_rows empty-case from an ERROR + exit to a WARN and continue; when dictionary_rows or dictionary_training_rows are empty, insert a single _n/a_ table row (with dash placeholders) into benchmark-report.md.
CI/CD Workflow Automation
.github/workflows/ci.yml
In the benchmark job, added conditional steps for pushes to main that checkout gh-pages into a subdir, create gh-pages/dev/bench/, copy benchmark-report.md, benchmark-delta.json, and benchmark-delta.md into that path with fixed names, git-add and commit only if staged changes exist, and push using the app token.
Documentation Links
README.md
Added links in "Benchmarks Dashboard" to the latest benchmark-delta.md and benchmark-report.md on GitHub Pages under /dev/bench/.

Sequence Diagram(s)

sequenceDiagram
  participant Runner as CI Runner
  participant BenchScript as run-benchmarks.sh
  participant Workspace as Job Workspace
  participant GhPages as gh-pages (subdir)

  Runner->>BenchScript: start benchmark job
  BenchScript->>Workspace: generate artifacts (benchmark-report.md, benchmark-delta.json, benchmark-delta.md)
  Runner->>GhPages: checkout `gh-pages` into subdir
  Runner->>GhPages: create `dev/bench/` and copy artifacts into it
  Runner->>GhPages: git add files
  Runner->>GhPages: git diff --cached || git commit
  Runner->>GhPages: push using app token
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • PR #38: Modifies the same benchmark reporting script (.github/scripts/run-benchmarks.sh) for handling dictionary-report lines and table output.

Poem

🐰 A soft little warning, no tumble or fall,
Empty tables filled with a tiny _n/a_ call.
Artifacts hop to Pages, snug in their den,
Benchmarks parade quietly—hurray again! 🥕📊

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix(ci): publish benchmark delta reports' directly relates to the main objective of publishing benchmark reports to gh-pages/dev/bench, which is the core change across the modified CI workflow, scripts, and documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/bench-pages-delta-reports-pr

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/scripts/run-benchmarks.sh:
- Line 299: Update the warning string currently set to "WARN: No
REPORT_DICT_TRAIN lines parsed; dictionary training section will be empty." so
it accurately reflects that a placeholder row is emitted; change the message to
indicate "no data rows parsed; placeholder row will be emitted." Locate the
exact literal in the shell script (the string on line with WARN: No
REPORT_DICT_TRAIN) and replace it with the new wording; keep surrounding
formatting and quoting identical and run the script to verify the updated
message appears where previously the old warning printed.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: dc1fa69e-3d48-4be3-a72c-c4f219db7860

📥 Commits

Reviewing files that changed from the base of the PR and between da9d061 and 8be3e27.

📒 Files selected for processing (3)
  • .github/scripts/run-benchmarks.sh
  • .github/workflows/ci.yml
  • README.md

Comment thread .github/scripts/run-benchmarks.sh Outdated
Copy link
Copy Markdown

@sw-release-bot sw-release-bot Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'structured-zstd vs C FFI'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.15.

Benchmark suite Current: ce3624a Previous: b280757 Ratio
compress/best/small-4k-log-lines/matrix/c_ffi 0.344 ms 0.28 ms 1.23
compress/fastest/low-entropy-1m/matrix/c_ffi 0.17 ms 0.142 ms 1.20
compress/fastest/large-log-stream/matrix/c_ffi 2.55 ms 2.149 ms 1.19
decompress/fastest/high-entropy-1m/c_stream/matrix/c_ffi 0.033 ms 0.027 ms 1.22
decompress/default/high-entropy-1m/rust_stream/matrix/c_ffi 0.156 ms 0.109 ms 1.43
decompress/best/high-entropy-1m/rust_stream/matrix/c_ffi 0.144 ms 0.12 ms 1.20
decompress/best/high-entropy-1m/c_stream/matrix/c_ffi 0.161 ms 0.038 ms 4.24

This comment was automatically generated by workflow using github-action-benchmark.

CC: @polaz

- update REPORT_DICT_TRAIN warning to mention _n/a_ placeholder output
- rename gh-pages publish commit message to benchmark reports
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/scripts/run-benchmarks.sh:
- Around line 484-485: The REPORT_DICT warning text is inconsistent with the
code path that emits a placeholder row when dictionary_rows is empty; update the
message referenced by REPORT_DICT (or the variable/constant used at the previous
message location) so it no longer claims the section “will be empty” and instead
reflects that an “_n/a_” placeholder row is written (search for REPORT_DICT,
dictionary_rows, and the lines.append call that writes "| _n/a_ | _no dictionary
rows emitted in this run_ |" and change the warning text accordingly).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: d00833d3-988d-4b9d-8996-e3976a4f5442

📥 Commits

Reviewing files that changed from the base of the PR and between 8be3e27 and 0f011dd.

📒 Files selected for processing (2)
  • .github/scripts/run-benchmarks.sh
  • .github/workflows/ci.yml

Comment thread .github/scripts/run-benchmarks.sh
- update REPORT_DICT warning to mention _n/a_ placeholder rows when section has no data
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

Comment thread .github/scripts/run-benchmarks.sh
@polaz polaz merged commit 71708e5 into main Apr 6, 2026
10 of 11 checks passed
@polaz polaz deleted the fix/bench-pages-delta-reports-pr branch April 6, 2026 15:48
@sw-release-bot sw-release-bot Bot mentioned this pull request Apr 6, 2026
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.

2 participants