Pausing benchmarks
Chris Vest
mr.chrisvest at gmail.com
Fri Aug 21 15:00:45 UTC 2015
Hi Aleksey,
Alright, that’s fair. The benchmark, or benchmarks rather, are already running from a script, so I can kill and resume it, and only set it back an hour or so. If I really want or need to. Thanks.
Cheers,
Chris
> On 21 Aug 2015, at 16:08, Aleksey Shipilev <aleksey.shipilev at oracle.com> wrote:
>
> Hi Chris,
>
> On 08/21/2015 02:49 PM, Chris Vest wrote:
>> I’m wondering if it’s possible to pause a benchmark, without badly
>> influencing the measurements, by sending the -STOP signal to the
>> parent JMH process (assuming -f >= 1), and then wait for the
>> iteration or the fork to finish.
>
> That's technically doable, but tedious, and introduces the complexity
> that does not pay back for an overwhelming number of cases. There are
> already options available for your corner case:
> a) Chop the work into smaller pieces, and (re-)run benchmark after
> benchmark manually;
> b) Make up the API runner that checks for the "pause" condition, before
> starting the next benchmark;
> c) Check for "pause" condition in @TearDown(Level.Trial), and stall
> there if needed.
>
> All these require additional work from you, but that is expected once
> you deviate to corner use cases.
>
> Thanks,
> -Alekse
>
More information about the jmh-dev
mailing list