Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 13 additions & 26 deletions .github/workflows/comment-profiling-changes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,14 @@ jobs:
- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Install Valgrind
run: |
sudo apt update
sudo apt install -y valgrind

- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
with:
# Cache on Cargo.lock file
cache-on-failure: true

- name: Cache iai-callgrind binary
id: cache-iai
uses: actions/cache@v5
with:
path: ~/.cargo/bin/iai-callgrind-runner
key: ${{ runner.os }}-iai-callgrind-runner-0.16.1

- name: Install iai-callgrind
if: steps.cache-iai.outputs.cache-hit != 'true'
run: cargo install iai-callgrind-runner@0.16.1
- name: Install gungraun-runner and valgrind
uses: gungraun/setup-gungraun@v1

- name: Checkout master branch
run: |
Expand All @@ -66,34 +53,34 @@ jobs:
id: cache-benchmark-baselines
uses: actions/cache@v5
with:
path: target/iai
key: ${{ runner.os }}-${{ runner.arch }}-${{ steps.cpu-info.outputs.cpu-hash }}-benchmark-baselines-master-${{ steps.master-sha.outputs.sha }}
path: target/gungraun
key: ${{ runner.os }}-${{ runner.arch }}-${{ steps.cpu-info.outputs.cpu-hash }}-gungraun-benchmark-baselines-master-${{ steps.master-sha.outputs.sha }}
restore-keys: |
${{ runner.os }}-${{ runner.arch }}-${{ steps.cpu-info.outputs.cpu-hash }}-benchmark-baselines-master-
${{ runner.os }}-${{ runner.arch }}-${{ steps.cpu-info.outputs.cpu-hash }}-gungraun-benchmark-baselines-master-

- name: Run baseline benchmarks
if: steps.cache-benchmark-baselines.outputs.cache-hit != 'true'
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
cargo bench --bench update_executor_iai -- --save-baseline=master
cargo bench --bench run_once_iai -- --save-baseline=master
cargo bench --bench run_cached_iai -- --save-baseline=master
cargo bench --bench update_executor_gungraun -- --save-baseline=master
cargo bench --bench run_once_gungraun -- --save-baseline=master
cargo bench --bench run_cached_gungraun -- --save-baseline=master

- name: Checkout PR branch
run: git checkout ${{ github.event.pull_request.head.sha }}

- name: Run PR benchmarks
run: |
# Compile benchmarks
cargo bench --bench compile_demo_art_iai -- --baseline=master --output-format=json | jq -sc | sed 's/\\"//g' > /tmp/compile_output.json
cargo bench --bench compile_demo_art_gungraun -- --baseline=master --output-format=json | jq -sc | sed 's/\\"//g' > /tmp/compile_output.json

# Runtime benchmarks
cargo bench --bench update_executor_iai -- --baseline=master --output-format=json | jq -sc | sed 's/\\"//g' > /tmp/update_output.json
cargo bench --bench run_once_iai -- --baseline=master --output-format=json | jq -sc | sed 's/\\"//g' > /tmp/run_once_output.json
cargo bench --bench run_cached_iai -- --baseline=master --output-format=json | jq -sc | sed 's/\\"//g' > /tmp/run_cached_output.json
cargo bench --bench update_executor_gungraun -- --baseline=master --output-format=json | jq -sc | sed 's/\\"//g' > /tmp/update_output.json
cargo bench --bench run_once_gungraun -- --baseline=master --output-format=json | jq -sc | sed 's/\\"//g' > /tmp/run_once_output.json
cargo bench --bench run_cached_gungraun -- --baseline=master --output-format=json | jq -sc | sed 's/\\"//g' > /tmp/run_cached_output.json

- name: Make old comments collapsed by default
# Only run if we have write permissions (not a fork)
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ flamegraph.svg
.idea/
.direnv
.DS_Store
.nvim.lua
86 changes: 48 additions & 38 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ petgraph = { version = "0.7", default-features = false, features = ["graphmap"]
half = { version = "2.4", default-features = false, features = ["bytemuck"] }
tinyvec = { version = "1", features = ["std"] }
criterion = { version = "0.7", features = ["html_reports"] }
iai-callgrind = { version = "0.16" }
gungraun = { version = "0.18" }
ndarray = "0.16"
strum = { version = "0.27", features = ["derive"] }
dirs = "6.0"
Expand Down
2 changes: 1 addition & 1 deletion deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ ignore = [
"RUSTSEC-2024-0388", # Unmaintained `derivative`, used directly by graphite-editor and graphite-desktop
"RUSTSEC-2024-0436", # Unmaintained `paste`, pulled in by dependencies `metal` and `wgpu-hal`
"RUSTSEC-2025-0134", # Unmaintained `rustls-pemfile`, pulled in by build dependency `download-cef`
"RUSTSEC-2025-0141", # Unmaintained `bincode`, pulled in by dev dependency `iai-callgrind`
"RUSTSEC-2025-0141", # Unmaintained `bincode`, pulled in by dev dependency `gungraun`
]
# Threshold for security vulnerabilities, any vulnerability with a CVSS score
# lower than the range specified will be ignored. Note that ignored advisories
Expand Down
4 changes: 2 additions & 2 deletions node-graph/graph-craft/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ winit = { workspace = true }
graph-craft = { workspace = true, features = ["loading"] }
pretty_assertions = { workspace = true }
criterion = { workspace = true }
iai-callgrind = { workspace = true }
gungraun = { workspace = true }

# Benchmarks
[[bench]]
name = "compile_demo_art_criterion"
harness = false

[[bench]]
name = "compile_demo_art_iai"
name = "compile_demo_art_gungraun"
harness = false
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use graph_craft::document::NodeNetwork;
use graph_craft::util::*;
use iai_callgrind::{library_benchmark, library_benchmark_group, main};
use gungraun::prelude::*;

#[library_benchmark]
#[benches::with_setup(args = ["isometric-fountain", "painted-dreams", "procedural-string-lights", "parametric-dunescape", "red-dress", "valley-of-spires"], setup = load_from_name)]
Expand Down
8 changes: 4 additions & 4 deletions node-graph/interpreted-executor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ serde = { workspace = true }
# Workspace dependencies
graph-craft = { workspace = true, features = ["loading"] }
criterion = { workspace = true }
iai-callgrind = { workspace = true }
gungraun = { workspace = true }
preprocessor = { workspace = true }

# Benchmarks
Expand All @@ -47,13 +47,13 @@ name = "run_cached"
harness = false

[[bench]]
name = "update_executor_iai"
name = "update_executor_gungraun"
harness = false

[[bench]]
name = "run_once_iai"
name = "run_once_gungraun"
harness = false

[[bench]]
name = "run_cached_iai"
name = "run_cached_gungraun"
harness = false
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ mod benchmark_util;

use benchmark_util::setup_network;
use graphene_std::application_io::RenderConfig;
use iai_callgrind::{library_benchmark, library_benchmark_group, main};
use gungraun::prelude::*;
use interpreted_executor::dynamic_executor::DynamicExecutor;
use std::hint::black_box;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ mod benchmark_util;

use benchmark_util::setup_network;
use graphene_std::application_io;
use iai_callgrind::{library_benchmark, library_benchmark_group, main};
use gungraun::prelude::*;
use interpreted_executor::dynamic_executor::DynamicExecutor;
use std::hint::black_box;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ mod benchmark_util;

use benchmark_util::setup_network;
use graph_craft::proto::ProtoNetwork;
use iai_callgrind::{library_benchmark, library_benchmark_group, main};
use gungraun::prelude::*;
use interpreted_executor::dynamic_executor::DynamicExecutor;
use std::hint::black_box;

Expand Down
Loading