feat output artifacts to tmp; add bench & profiling; minor fixes

This commit is contained in:
2026-02-23 02:51:39 -07:00
parent 9649961580
commit f8ced2196c
13 changed files with 2404 additions and 221 deletions

28
benches/benchmark.rs Normal file
View File

@@ -0,0 +1,28 @@
use criterion::{Criterion, criterion_group, criterion_main};
use skyforge::{Args, DeviceConfigBundle, Specification};
use std::path::PathBuf;
fn benchmark(c: &mut Criterion) {
let args = Args {
devices: regex::Regex::new(".*").unwrap(),
env: skyforge::cli::EnvVars {
spec_path: PathBuf::from("./demo/spec"),
tmpl_path: PathBuf::from("./demo/tmpl"),
out_path: PathBuf::from("./demo/out"),
log_path: PathBuf::from("./demo/log"),
},
};
c.bench_function("compile", |b| {
b.iter(|| {
for spec in Specification::compile(&args) {
DeviceConfigBundle::from_spec(spec)
.unwrap()
.output_artifacts();
}
})
});
}
criterion_group!(benches, benchmark);
criterion_main!(benches);