Files
Entropyk/crates/solver/benches/batch_solve.rs
sepehr 5bd180b5b8
Some checks failed
CI / check (push) Has been cancelled
Snapshot WIP: solver HP epic progress, BPHX/HX physics, BMAD skill refresh.
Capture uncommitted solver robustness work (regularization, domain errors, linear solver lifecycle, tube DP/MSH), web workbench updates, and synced BMAD skills across IDE agent folders before starting BPHX pressure-drop.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-19 16:35:31 +02:00

33 lines
1.0 KiB
Rust

//! Phase-0 benchmark: sequential batch-solve scaling baseline.
//!
//! Solves N independent copies of the same reference cycle sequentially. This is
//! the Phase-0 *sequential* baseline; any parallel batch path belongs to Epic 4
//! and is intentionally out of scope here.
use criterion::{black_box, criterion_group, criterion_main, BenchmarkId};
mod common;
fn bench_batch_sequential(c: &mut criterion::Criterion) {
let mut group = c.benchmark_group("batch_solve_sequential");
for n in [1, 2, 4] {
group.bench_with_input(BenchmarkId::from_parameter(n), &n, |b, &n| {
b.iter(|| {
for _ in 0..n {
let mut system = common::build_reference_cycle_a();
common::solve_reference_system(&mut system);
black_box(());
}
});
});
}
group.finish();
}
criterion_group! {
name = benches;
config = common::end_to_end_criterion();
targets = bench_batch_sequential
}
criterion_main!(benches);