WIP: Thumbnails

This commit is contained in:
Adam
2025-07-16 01:43:00 -07:00
parent 8b665d158c
commit fcd379a62f
50 changed files with 1208 additions and 1053 deletions
@@ -7,7 +7,7 @@ use interpreted_executor::dynamic_executor::DynamicExecutor;
pub fn setup_network(name: &str) -> (DynamicExecutor, ProtoNetwork) {
let mut network = load_from_name(name);
let proto_network = network.flatten().unwrap().0;
let proto_network = network.compile().unwrap().0;
let executor = block_on(DynamicExecutor::new(proto_network.clone())).unwrap();
(executor, proto_network)
}
@@ -7,7 +7,7 @@ use interpreted_executor::dynamic_executor::DynamicExecutor;
fn update_executor<M: Measurement>(name: &str, c: &mut BenchmarkGroup<M>) {
let mut network = load_from_name(name);
let proto_network = network.flatten().unwrap().0;
let proto_network = network.compile().unwrap().0;
let empty = ProtoNetwork::default();
let executor = futures::executor::block_on(DynamicExecutor::new(empty)).unwrap();
@@ -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))),
|(mut executor, network)| futures::executor::block_on(executor.update(black_box(network, None))),
criterion::BatchSize::SmallInput,
)
});
@@ -30,7 +30,7 @@ fn update_executor_demo(c: &mut Criterion) {
fn run_once<M: Measurement>(name: &str, c: &mut BenchmarkGroup<M>) {
let mut network = load_from_name(name);
let proto_network = network.flatten().unwrap().0;
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();
@@ -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))),
|(mut executor, network)| futures::executor::block_on(executor.update(criterion::black_box(network, None))),
criterion::BatchSize::SmallInput,
)
});