Fix and reenable profiling CI action (#2632)

* Reenable profiling ci action

* Remove deprecated iai feature flag

* Remove unused import

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
Dennis Kobert
2025-05-18 22:31:15 +02:00
committed by GitHub
parent ebf351277d
commit 7a2144e31e
5 changed files with 21 additions and 16 deletions

View File

@@ -2,16 +2,16 @@ 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::transform::Footprint;
use graphene_std::Context;
fn subsequent_evaluations(c: &mut Criterion) {
let mut group = c.benchmark_group("Subsequent Evaluations");
let footprint = Footprint::default();
let context: Context = None;
bench_for_each_demo(&mut group, |name, g| {
let (executor, _) = setup_network(name);
futures::executor::block_on((&executor).execute(criterion::black_box(footprint))).unwrap();
g.bench_function(name, |b| b.iter(|| futures::executor::block_on((&executor).execute(criterion::black_box(footprint)))));
g.bench_function(name, |b| {
b.iter(|| futures::executor::block_on(executor.tree().eval_tagged_value(executor.output(), criterion::black_box(context.clone()))).unwrap())
});
});
group.finish();
}

View File

@@ -2,17 +2,16 @@ 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::transform::Footprint;
use graphene_std::Context;
fn run_once(c: &mut Criterion) {
let mut group = c.benchmark_group("Run Once");
let footprint = Footprint::default();
let context: Context = None;
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).execute(criterion::black_box(footprint))),
|(executor, _)| futures::executor::block_on(executor.tree().eval_tagged_value(executor.output(), criterion::black_box(context.clone()))).unwrap(),
criterion::BatchSize::SmallInput,
)
});