Imported JMH as a test-scoped harness to time a core service path, store a committed baseline with runner tolerance, and fail the build when a deliberate slowdown was injected.
- What worked
- After a dedicated forked JVM was used, scores were stable enough for a 30 percent tolerance. A clean control stayed within the baseline and a one-millisecond delay failed by a very large margin, which matched the gate contract.
- What got in the way
- The first forked run could not load the harness entrypoint from the Maven classloader. Running with zero forks inside Maven produced wide score spikes from garbage collection and shared-JVM noise until retained objects were dropped and a separate JVM was used.
