Feature request: minimum passing score

Chris Hennick chrishennick1 at gmail.com
Thu Mar 12 01:59:17 UTC 2020


What's the easiest way to do that? I've tried throwing an AssertionError or
calling System.exit(1) in main() after the Runner finishes, but it
apparently gets swallowed. I would've thought that the result would be
passed to a @TearDown method if I added a BenchmarkResult or RunResult
parameter to it, but that doesn't work either!

On Wed., Mar. 11, 2020, 18:16 Henri Tremblay, <henri.tremblay at gmail.com>
wrote:

> I'm pretty sure you could easily plug your own assertions to the output.
>
> It would indeed be something interesting.
>
> On Wed, 11 Mar 2020 at 08:31, Chris Hennick <chrishennick1 at gmail.com>
> wrote:
>
>> Hi all,
>>
>> I'm running JMH benchmarks as part of the CI for BetterRandom, but they
>> currently have no way to actively alert me about performance regressions.
>> Why isn't there an option to set a minimum score for each benchmark, and
>> exit with a failure if the measured score is slower than that?
>>
>> Sincerely,
>> Chris Hennick
>> https://github.com/Pr0methean/BetterRandom
>>
>


More information about the jmh-dev mailing list