-
-
Notifications
You must be signed in to change notification settings - Fork 503
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add manually-runnable benchmarks for runtime profiling (#2005)
* Split benches into two files * Implement executor update bench * Restructure benchmarks * Unify usages of wrap network in scope * Remove unused imports * Fix oom bug * Remove bounding box impl
- Loading branch information
1 parent
c5454af
commit f8c7ada
Showing
25 changed files
with
378 additions
and
270 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
node-graph/graph-craft/benches/compile_demo_art_criterion.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
use criterion::{black_box, criterion_group, criterion_main, Criterion}; | ||
use graph_craft::util::DEMO_ART; | ||
fn compile_to_proto(c: &mut Criterion) { | ||
use graph_craft::util::{compile, load_from_name}; | ||
let mut c = c.benchmark_group("Compile Network cold"); | ||
|
||
for name in DEMO_ART { | ||
let network = load_from_name(name); | ||
c.bench_function(name, |b| b.iter_batched(|| network.clone(), |network| compile(black_box(network)), criterion::BatchSize::SmallInput)); | ||
} | ||
} | ||
|
||
criterion_group!(benches, compile_to_proto); | ||
criterion_main!(benches); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
use graph_craft::document::NodeNetwork; | ||
use graph_craft::util::*; | ||
use iai_callgrind::{black_box, library_benchmark, library_benchmark_group, main}; | ||
|
||
#[library_benchmark] | ||
#[benches::with_setup(args = ["isometric-fountain", "painted-dreams", "procedural-string-lights", "red-dress", "valley-of-spires"], setup = load_from_name)] | ||
pub fn compile_to_proto(_input: NodeNetwork) { | ||
black_box(compile(_input)); | ||
} | ||
|
||
library_benchmark_group!(name = compile_group; benchmarks = compile_to_proto); | ||
|
||
main!(library_benchmark_groups = compile_group); |
Oops, something went wrong.