mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-08-23 22:44:04 +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
24 lines
1 KiB
Rust
24 lines
1 KiB
Rust
mod benchmark_util;
|
|
|
|
use benchmark_util::setup_network;
|
|
use graph_craft::proto::ProtoNetwork;
|
|
use iai_callgrind::{black_box, library_benchmark, library_benchmark_group, main};
|
|
use interpreted_executor::dynamic_executor::DynamicExecutor;
|
|
|
|
fn setup_update_executor(name: &str) -> (DynamicExecutor, ProtoNetwork) {
|
|
let (_, proto_network) = setup_network(name);
|
|
let empty = ProtoNetwork::default();
|
|
let executor = futures::executor::block_on(DynamicExecutor::new(empty)).unwrap();
|
|
(executor, proto_network)
|
|
}
|
|
|
|
#[library_benchmark]
|
|
#[benches::with_setup(args = ["isometric-fountain", "painted-dreams", "procedural-string-lights", "parametric-dunescape", "red-dress", "valley-of-spires"], setup = setup_update_executor)]
|
|
pub fn update_executor(setup: (DynamicExecutor, ProtoNetwork)) {
|
|
let (mut executor, network) = setup;
|
|
let _ = black_box(futures::executor::block_on(executor.update(black_box(network))));
|
|
}
|
|
|
|
library_benchmark_group!(name = update_group; benchmarks = update_executor);
|
|
|
|
main!(library_benchmark_groups = update_group);
|