Fix tests

This commit is contained in:
Adam
2025-07-15 11:54:20 -07:00
parent da22edbe1a
commit 04ff7b75e5
8 changed files with 23 additions and 25 deletions

View File

@@ -15,7 +15,7 @@ fn update_executor<M: Measurement>(name: &str, c: &mut BenchmarkGroup<M>) {
c.bench_function(name, |b| {
b.iter_batched(
|| (executor.clone(), proto_network.clone()),
|(mut executor, network)| futures::executor::block_on(executor.update(black_box(network, None))),
|(mut executor, network)| futures::executor::block_on(executor.update(black_box(network), None)),
criterion::BatchSize::SmallInput,
)
});
@@ -33,7 +33,7 @@ fn run_once<M: Measurement>(name: &str, c: &mut BenchmarkGroup<M>) {
let proto_network = network.compile().unwrap().0;
let executor = futures::executor::block_on(DynamicExecutor::new(proto_network)).unwrap();
let context = graphene_std::any::EditorContext::default();
let context = graphene_std::EditorContext::default();
c.bench_function(name, |b| b.iter(|| futures::executor::block_on((&executor).evaluate_from_node(context.clone(), None))));
}

View File

@@ -16,7 +16,7 @@ fn update_executor(c: &mut Criterion) {
let executor = futures::executor::block_on(DynamicExecutor::new(empty)).unwrap();
(executor, proto_network)
},
|(mut executor, network)| futures::executor::block_on(executor.update(criterion::black_box(network, None))),
|(mut executor, network)| futures::executor::block_on(executor.update(criterion::black_box(network), None)),
criterion::BatchSize::SmallInput,
)
});