feat(causal): ledger-audit output in the pipeline demo and attrib probe
- causal_pipeline: SMARM_CAUSAL_AUDIT=1 appends render_ledger_audit() after the summary; pinned summary format untouched. - causal_attrib_probe: per-pct audit line (absorbed/forgiven/drops/ discards) under the existing eff line, so in-site-vs-attributed and the loss buckets land in one place for the sweep. 1-core smoke (work + wide): books balance — absorbed = 2x injected and forgiven = 2x injected, i.e. owed = injected x (N-1) with N=5 actors, zero outstanding. drop park = 0 even in wide mode (the bottleneck's queue is never empty, so its in-guard recv never parks); drop yield is ~1500 events but ~0.1ms per window, confirming slice-expiry yields sample at their own checkpoint. Deficit decomposition needs the parallel box.
This commit is contained in:
@@ -247,6 +247,12 @@ fn main() {
|
||||
background.join().unwrap();
|
||||
|
||||
print!("{}", smarm::causal::render_summary(&results));
|
||||
// RFC 007 deficit hunt: SMARM_CAUSAL_AUDIT=1 appends the per-cell
|
||||
// ledger audit (injected/absorbed/forgiven + drop and discard
|
||||
// buckets) without touching the pinned summary format.
|
||||
if std::env::var_os("SMARM_CAUSAL_AUDIT").is_some() {
|
||||
print!("{}", smarm::causal::render_ledger_audit(&results));
|
||||
}
|
||||
let coz = smarm::causal::render_coz(&results);
|
||||
match std::fs::write("profile.coz", coz) {
|
||||
Ok(()) => println!("\nwrote profile.coz"),
|
||||
|
||||
Reference in New Issue
Block a user