mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-08-24 06:54:07 +00:00

* 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
23 lines
713 B
Rust
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);
|