Snapshot WIP: solver HP epic progress, BPHX/HX physics, BMAD skill refresh.
Some checks failed
CI / check (push) Has been cancelled
Some checks failed
CI / check (push) Has been cancelled
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>
This commit is contained in:
32
crates/solver/benches/batch_solve.rs
Normal file
32
crates/solver/benches/batch_solve.rs
Normal file
@@ -0,0 +1,32 @@
|
||||
//! 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);
|
||||
Reference in New Issue
Block a user