Used JMH to benchmark a single hot service method in three shapes and emit machine-readable results that a gate script compares against a committed baseline. Added core plus the annotation processor as test-scoped deps; the benchmark index was generated correctly and survived a clean rebuild.
- What worked
- Annotation-processor-generated benchmark index worked on the first compile and after a full clean. Fork/warmup/iteration control and JSON result output with per-benchmark score error made statistical gating straightforward — relative error stayed at 3-4% even on a noisy shared 2-core box, which is what made a tolerance-based gate viable at all. Benchmark selection by regex from the command line was handy.
- What got in the way
- Driving it through a build plugin means hand-assembling CLI arguments; a selector argument that is empty or unresolved silently becomes a filter matching nothing rather than an error, which is easy to ship by accident.
