Skip to content

Commit 456a7c8

Browse files
Migrate iai-callgrind to the renamed successor gungraun (#4056)
* Add .nvim.lua to gitignore * Migrate from iai-callgrind to the renamed successor gungraun --------- Co-authored-by: Dennis Kobert <dennis@kobert.dev>
1 parent 1c9c19a commit 456a7c8

11 files changed

Lines changed: 74 additions & 76 deletions

File tree

.github/workflows/comment-profiling-changes.yaml

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -22,27 +22,14 @@ jobs:
2222
- name: Install Rust
2323
uses: dtolnay/rust-toolchain@stable
2424

25-
- name: Install Valgrind
26-
run: |
27-
sudo apt update
28-
sudo apt install -y valgrind
29-
3025
- name: Cache Rust dependencies
3126
uses: Swatinem/rust-cache@v2
3227
with:
3328
# Cache on Cargo.lock file
3429
cache-on-failure: true
3530

36-
- name: Cache iai-callgrind binary
37-
id: cache-iai
38-
uses: actions/cache@v5
39-
with:
40-
path: ~/.cargo/bin/iai-callgrind-runner
41-
key: ${{ runner.os }}-iai-callgrind-runner-0.16.1
42-
43-
- name: Install iai-callgrind
44-
if: steps.cache-iai.outputs.cache-hit != 'true'
45-
run: cargo install iai-callgrind-runner@0.16.1
31+
- name: Install gungraun-runner and valgrind
32+
uses: gungraun/setup-gungraun@v1
4633

4734
- name: Checkout master branch
4835
run: |
@@ -66,34 +53,34 @@ jobs:
6653
id: cache-benchmark-baselines
6754
uses: actions/cache@v5
6855
with:
69-
path: target/iai
70-
key: ${{ runner.os }}-${{ runner.arch }}-${{ steps.cpu-info.outputs.cpu-hash }}-benchmark-baselines-master-${{ steps.master-sha.outputs.sha }}
56+
path: target/gungraun
57+
key: ${{ runner.os }}-${{ runner.arch }}-${{ steps.cpu-info.outputs.cpu-hash }}-gungraun-benchmark-baselines-master-${{ steps.master-sha.outputs.sha }}
7158
restore-keys: |
72-
${{ runner.os }}-${{ runner.arch }}-${{ steps.cpu-info.outputs.cpu-hash }}-benchmark-baselines-master-
59+
${{ runner.os }}-${{ runner.arch }}-${{ steps.cpu-info.outputs.cpu-hash }}-gungraun-benchmark-baselines-master-
7360
7461
- name: Run baseline benchmarks
7562
if: steps.cache-benchmark-baselines.outputs.cache-hit != 'true'
7663
run: |
7764
# Compile benchmarks
78-
cargo bench --bench compile_demo_art_iai -- --save-baseline=master
65+
cargo bench --bench compile_demo_art_gungraun -- --save-baseline=master
7966
8067
# Runtime benchmarks
81-
cargo bench --bench update_executor_iai -- --save-baseline=master
82-
cargo bench --bench run_once_iai -- --save-baseline=master
83-
cargo bench --bench run_cached_iai -- --save-baseline=master
68+
cargo bench --bench update_executor_gungraun -- --save-baseline=master
69+
cargo bench --bench run_once_gungraun -- --save-baseline=master
70+
cargo bench --bench run_cached_gungraun -- --save-baseline=master
8471
8572
- name: Checkout PR branch
8673
run: git checkout ${{ github.event.pull_request.head.sha }}
8774

8875
- name: Run PR benchmarks
8976
run: |
9077
# Compile benchmarks
91-
cargo bench --bench compile_demo_art_iai -- --baseline=master --output-format=json | jq -sc | sed 's/\\"//g' > /tmp/compile_output.json
78+
cargo bench --bench compile_demo_art_gungraun -- --baseline=master --output-format=json | jq -sc | sed 's/\\"//g' > /tmp/compile_output.json
9279
9380
# Runtime benchmarks
94-
cargo bench --bench update_executor_iai -- --baseline=master --output-format=json | jq -sc | sed 's/\\"//g' > /tmp/update_output.json
95-
cargo bench --bench run_once_iai -- --baseline=master --output-format=json | jq -sc | sed 's/\\"//g' > /tmp/run_once_output.json
96-
cargo bench --bench run_cached_iai -- --baseline=master --output-format=json | jq -sc | sed 's/\\"//g' > /tmp/run_cached_output.json
81+
cargo bench --bench update_executor_gungraun -- --baseline=master --output-format=json | jq -sc | sed 's/\\"//g' > /tmp/update_output.json
82+
cargo bench --bench run_once_gungraun -- --baseline=master --output-format=json | jq -sc | sed 's/\\"//g' > /tmp/run_once_output.json
83+
cargo bench --bench run_cached_gungraun -- --baseline=master --output-format=json | jq -sc | sed 's/\\"//g' > /tmp/run_cached_output.json
9784
9885
- name: Make old comments collapsed by default
9986
# Only run if we have write permissions (not a fork)

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ flamegraph.svg
1212
.idea/
1313
.direnv
1414
.DS_Store
15+
.nvim.lua

Cargo.lock

Lines changed: 48 additions & 38 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ petgraph = { version = "0.7", default-features = false, features = ["graphmap"]
199199
half = { version = "2.4", default-features = false, features = ["bytemuck"] }
200200
tinyvec = { version = "1", features = ["std"] }
201201
criterion = { version = "0.7", features = ["html_reports"] }
202-
iai-callgrind = { version = "0.16" }
202+
gungraun = { version = "0.18" }
203203
ndarray = "0.16"
204204
strum = { version = "0.27", features = ["derive"] }
205205
dirs = "6.0"

deny.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ ignore = [
4242
"RUSTSEC-2024-0388", # Unmaintained `derivative`, used directly by graphite-editor and graphite-desktop
4343
"RUSTSEC-2024-0436", # Unmaintained `paste`, pulled in by dependencies `metal` and `wgpu-hal`
4444
"RUSTSEC-2025-0134", # Unmaintained `rustls-pemfile`, pulled in by build dependency `download-cef`
45-
"RUSTSEC-2025-0141", # Unmaintained `bincode`, pulled in by dev dependency `iai-callgrind`
45+
"RUSTSEC-2025-0141", # Unmaintained `bincode`, pulled in by dev dependency `gungraun`
4646
]
4747
# Threshold for security vulnerabilities, any vulnerability with a CVSS score
4848
# lower than the range specified will be ignored. Note that ignored advisories

node-graph/graph-craft/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ winit = { workspace = true }
6262
graph-craft = { workspace = true, features = ["loading"] }
6363
pretty_assertions = { workspace = true }
6464
criterion = { workspace = true }
65-
iai-callgrind = { workspace = true }
65+
gungraun = { workspace = true }
6666

6767
# Benchmarks
6868
[[bench]]
6969
name = "compile_demo_art_criterion"
7070
harness = false
7171

7272
[[bench]]
73-
name = "compile_demo_art_iai"
73+
name = "compile_demo_art_gungraun"
7474
harness = false

node-graph/graph-craft/benches/compile_demo_art_iai.rs renamed to node-graph/graph-craft/benches/compile_demo_art_gungraun.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use graph_craft::document::NodeNetwork;
22
use graph_craft::util::*;
3-
use iai_callgrind::{library_benchmark, library_benchmark_group, main};
3+
use gungraun::prelude::*;
44

55
#[library_benchmark]
66
#[benches::with_setup(args = ["isometric-fountain", "painted-dreams", "procedural-string-lights", "parametric-dunescape", "red-dress", "valley-of-spires"], setup = load_from_name)]

node-graph/interpreted-executor/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ serde = { workspace = true }
3030
# Workspace dependencies
3131
graph-craft = { workspace = true, features = ["loading"] }
3232
criterion = { workspace = true }
33-
iai-callgrind = { workspace = true }
33+
gungraun = { workspace = true }
3434
preprocessor = { workspace = true }
3535

3636
# Benchmarks
@@ -47,13 +47,13 @@ name = "run_cached"
4747
harness = false
4848

4949
[[bench]]
50-
name = "update_executor_iai"
50+
name = "update_executor_gungraun"
5151
harness = false
5252

5353
[[bench]]
54-
name = "run_once_iai"
54+
name = "run_once_gungraun"
5555
harness = false
5656

5757
[[bench]]
58-
name = "run_cached_iai"
58+
name = "run_cached_gungraun"
5959
harness = false

node-graph/interpreted-executor/benches/run_cached_iai.rs renamed to node-graph/interpreted-executor/benches/run_cached_gungraun.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ mod benchmark_util;
22

33
use benchmark_util::setup_network;
44
use graphene_std::application_io::RenderConfig;
5-
use iai_callgrind::{library_benchmark, library_benchmark_group, main};
5+
use gungraun::prelude::*;
66
use interpreted_executor::dynamic_executor::DynamicExecutor;
77
use std::hint::black_box;
88

node-graph/interpreted-executor/benches/run_once_iai.rs renamed to node-graph/interpreted-executor/benches/run_once_gungraun.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ mod benchmark_util;
22

33
use benchmark_util::setup_network;
44
use graphene_std::application_io;
5-
use iai_callgrind::{library_benchmark, library_benchmark_group, main};
5+
use gungraun::prelude::*;
66
use interpreted_executor::dynamic_executor::DynamicExecutor;
77
use std::hint::black_box;
88

0 commit comments

Comments
 (0)