Graphite/node-graph/interpreted-executor/benches/run_once.rs
Dennis Kobert d2ddf94bd0
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
Include graph runtime benchmarks in CI perf regression runs (#2780)
* Include graph runtime benchmarks in ci regression run

* Update benchmarking workflow

* Add render slowdown

* Fix baseline cache

* Remove benchmark compilation validation run

* Include render node in runtime benchmarks

* Collapse sections without changes

* Readd rulers between the sections

* Add review suggestions

* Rulers rule

* Fix whitespace
2025-08-07 14:32:19 +02:00

23 lines
713 B
Rust

mod benchmark_util;
use benchmark_util::{bench_for_each_demo, setup_network};
use criterion::{Criterion, criterion_group, criterion_main};
use graphene_std::application_io::RenderConfig;
fn run_once(c: &mut Criterion) {
let mut group = c.benchmark_group("Run Once");
let context = RenderConfig::default();
bench_for_each_demo(&mut group, |name, g| {
g.bench_function(name, |b| {
b.iter_batched(
|| setup_network(name),
|(executor, _)| futures::executor::block_on(executor.tree().eval_tagged_value(executor.output(), criterion::black_box(context))).unwrap(),
criterion::BatchSize::SmallInput,
)
});
});
group.finish();
}
criterion_group!(benches, run_once);
criterion_main!(benches);