Skip to content

Migrate iai-callgrind to the renamed successor gungraun#4056

Open
gamma0987 wants to merge 2 commits intoGraphiteEditor:masterfrom
gamma0987:migrate-iai-callgrind-to-gungraun
Open

Migrate iai-callgrind to the renamed successor gungraun#4056
gamma0987 wants to merge 2 commits intoGraphiteEditor:masterfrom
gamma0987:migrate-iai-callgrind-to-gungraun

Conversation

@gamma0987
Copy link
Copy Markdown

Migrate from iai-callgrind to gungraun

Summary

  • Replace iai-callgrind with gungraun and update it from v0.16 to v0.18
  • Rename all iai-callgrind benchmark files (*_iai.rs -> *_gungraun.rs) and their corresponding [[bench]] entries
  • All imports updated: use iai_callgrind::{…} -> use gungraun::prelude::*
  • Simplify CI workflow by replacing manual Valgrind installation and iai-callgrind-runner installation with the gungraun/setup-gungraun@v1 action.
  • Update benchmark cache path from target/iai to target/gungraun

Other minor changes:

  • Add .nvim.lua to .gitignore
  • Update deny.toml advisory comment to reference gungraun instead of iai-callgrind

Advantages of using the setup-gungraun action in the CI:

The action always tries to install the latest valgrind version. The action automatically installs the gungraun version which is used in the project, so the CI workflow no longer needs updates when bumping the gungraun version. Note that gungraun outputs the same json format as iai-callgrind, so no changes required here.

I changed the cache key since just changing the path from target/iai to target/gungraun might not change the cache hit output from the actions/cache action. So, Baselines and cache will be rebuilt from scratch on the next CI run.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request migrates the project's benchmarking infrastructure from iai-callgrind to gungraun. The changes include updating workspace and package-level Cargo.toml files, updating Cargo.lock, renaming benchmark targets and files, and adjusting imports in the benchmark source code. The .gitignore file was also updated to include .nvim.lua. I have no feedback to provide.

@gamma0987 gamma0987 marked this pull request as ready for review April 26, 2026 22:56
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 11 files

Confidence score: 3/5

  • There is a concrete CI regression risk: .github/workflows/comment-profiling-changes.yaml runs baseline benchmarks on master with renamed *_gungraun targets that are not present there.
  • Because the issue is severity 7/10 with high confidence (9/10), this is more than a minor housekeeping concern and could cause benchmark baseline generation to fail in normal workflow runs.
  • Pay close attention to .github/workflows/comment-profiling-changes.yaml - baseline benchmark commands need to match targets that actually exist on master to avoid CI failures.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".github/workflows/comment-profiling-changes.yaml">

<violation number="1" location=".github/workflows/comment-profiling-changes.yaml:65">
P1: Baseline benchmarks are executed on `master` using renamed `*_gungraun` targets that do not exist on current `master`, causing CI benchmark baseline generation to fail.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

run: |
# Compile benchmarks
cargo bench --bench compile_demo_art_iai -- --save-baseline=master
cargo bench --bench compile_demo_art_gungraun -- --save-baseline=master
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1: Baseline benchmarks are executed on master using renamed *_gungraun targets that do not exist on current master, causing CI benchmark baseline generation to fail.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/comment-profiling-changes.yaml, line 65:

<comment>Baseline benchmarks are executed on `master` using renamed `*_gungraun` targets that do not exist on current `master`, causing CI benchmark baseline generation to fail.</comment>

<file context>
@@ -66,34 +53,34 @@ jobs:
         run: |
           # Compile benchmarks
-          cargo bench --bench compile_demo_art_iai -- --save-baseline=master
+          cargo bench --bench compile_demo_art_gungraun -- --save-baseline=master
 
           # Runtime benchmarks
</file context>

@TrueDoctor
Copy link
Copy Markdown
Member

The code looks good, a bit of a shame we can't test the full ci workflow before merging the pr

@TrueDoctor TrueDoctor self-requested a review April 27, 2026 06:18
@gamma0987
Copy link
Copy Markdown
Author

I'm sorry I can't help with that.

@Keavon Keavon force-pushed the master branch 2 times, most recently from f07c79b to 76938eb Compare April 29, 2026 12:16
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