feat(examples): collect_gate — per-phase probe-attribution harness - #41
Conversation
Add `examples/collect_gate`: run `LearnedIndex::collect_smems` over a FASTQ against a built prmi sidecar, write the emitted SMEMs to a TSV, and report total SA-probes/read with a per-phase breakdown (pass-1 left/right, reseed left/forward, pass 3) from the `attrib` buckets. Now that pass 3 is live (#34) all five buckets populate, giving a complete per-read probe attribution for deciding where any future optimization would actually pay. Gated on `spectrum-probe-count` (the probe counter + `attrib` are compiled out without it); a stub main on the default build prints the feature hint and exits 2. Paths come from env (PRMI_PREFIX / PRMI_FQ / PRMI_PAC required, no machine-specific defaults — mirrors the ffi_overhead example); the CollectOpts knobs default to the bwa-mem values. stdout is just the probes/read number, for scripting. cargo build --all-targets clean (both feature configs); the missing-env path exits 2 with a clear message.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughAdds Changescollect_gate.rs benchmark example
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
Sibling PR 1 of 2 (the other adds a C usage example for
prmi_collect_smems). Closes out the collect deliverable with its profiling tooling.What
Adds
examples/collect_gate: runLearnedIndex::collect_smemsover a FASTQ against a built prmi sidecar, write the emitted SMEMs to a TSV (rid m n k s), and report total SA-probes/read with a per-phase breakdown — pass-1 left/right, reseed left/forward, and pass 3 — from theattribbuckets.Now that pass 3 is live (#34), all five
attribbuckets populate, so this gives a complete per-read probe attribution for a real read — useful for deciding whether any future optimization (e.g. eventually the deferred LCP-accel wiring, #36) would actually pay on a given workload, without an end-to-end consumer round-trip.Shape
spectrum-probe-countfeature (the probe counter +attribare compiled out without it); a stubmainon the default build prints the feature hint and exits 2.PRMI_PREFIX/PRMI_FQ/PRMI_PACrequired, no machine-specific defaults (mirrors theffi_overheadexample; the perf-branch original had hardcoded local paths, dropped here).CollectOptsknobs default to the bwa-mem values;PRMI_OUToptional.Testing
cargo build --all-targetsclean in both feature configs (stub-main default + real harness withspectrum-probe-count); fmt/clippy clean; the missing-env path exits 2 with a clear message. No production code touched — example only. Pre-PR/coderabbitai-review: 0 findings.Summary by CodeRabbit