mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-23 17:18:11 +08:00
Adapt the cutover to the reviewed core-types API
This commit is contained in:
@@ -2,6 +2,7 @@ mod benchmark_util;
|
||||
|
||||
use benchmark_util::{bench_for_each_demo, setup_network};
|
||||
use criterion::{Criterion, criterion_group, criterion_main};
|
||||
use graph_craft::graphene_compiler::Executor;
|
||||
use graphene_std::application_io::RenderConfig;
|
||||
|
||||
fn subsequent_evaluations(c: &mut Criterion) {
|
||||
@@ -9,9 +10,7 @@ fn subsequent_evaluations(c: &mut Criterion) {
|
||||
let context = RenderConfig::default();
|
||||
bench_for_each_demo(&mut group, |name, g| {
|
||||
let (executor, _) = setup_network(name);
|
||||
g.bench_function(name, |b| {
|
||||
b.iter(|| futures::executor::block_on(executor.tree().eval_tagged_value(executor.output(), std::hint::black_box(context))).unwrap())
|
||||
});
|
||||
g.bench_function(name, |b| b.iter(|| Executor::execute(&&executor, std::hint::black_box(context)).unwrap()));
|
||||
});
|
||||
group.finish();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user