Invert command line overriding
Aleksey Shipilev
aleksey.shipilev at oracle.com
Wed Apr 9 07:02:54 UTC 2014
On 04/08/2014 06:14 PM, Doug Simon wrote:
> For some individual benchmarks in a suite of benchmarks, I need
> extra warmup iterations. I can specify this with an explicit @Warmup
> annotation. However, it appears as though the -wi command line
> option overrides such annotations. Is it possible to somehow make -wi
> only apply to benchmarks for which there is no explicit @Warmup
> annotation?
No, the options overriding follow the simple principle: anything you can
supply later should override anything you supplied before. In this case,
command line options override the annotations. In this sense, command
line options provide the final authority on the benchmark execution mode.
> I could of course achieve this via separate jmh executions but that
> will non-trivial changes to our benchmarking infrastructure.
Or, you may use Java API to drive your benchmarks if you need something
not in line with the default JMH behavior.
-Aleksey.
More information about the jmh-dev
mailing list