Files
Timon 0df1e16233 Move network output tracking out of the executor into a handle returned by updates (#5019)
* Let the dynamic executor hold several networks, each executed and kept alive by a handle to its output

* Review
2026-11-25 22:19:19 +00:00

25 lines
737 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().into_context();
bench_for_each_demo(&mut group, |name, g| {
let context = context.clone();
g.bench_function(name, |b| {
b.iter_batched(
|| setup_network(name),
|(executor, output, _)| executor.tree().eval_tagged_value(output.node(), std::hint::black_box(&context)).unwrap(),
criterion::BatchSize::SmallInput,
)
});
});
group.finish();
}
criterion_group!(benches, run_once);
criterion_main!(benches);