Running mecirobenchmarks from IDE
Vladimir Ozerov
ppozerov at gmail.com
Sun Jul 6 16:50:42 UTC 2014
Henri,
I see your point, but:
1) What do I have to configure Maven tasks? The most user-friendly way to
launch it is just to click "Run" and don't bother about anything else. It
is possible since we have all necessary classes already build and available
in runtime classpath.
2) What if I do not use Maven at all and, moreover, don't want to use it?
The idea behind this feature is to give user ability to run benchmarks
instantly for quick preliminary assesment of his code, clearly explaining
him all the risk associated with it.
This should be pretty easy to implement. Say, we add another runner (e.g.
EmbeddedRunner) which generate benchmark code in runtime, compile it using
javac API and then run it:
Options opts = new OptionsBuilder().includeClass(MyBenchmark.class).build();
new EmbeddedRunner(opts).run();
2014-07-06 20:15 GMT+04:00 Henri Tremblay <henri.tremblay at gmail.com>:
> The easiest is to use a custom task from inside your IDE. Which will
> launch Maven and run it. You probably can add the BenchmarkList to your
> benchmark too but I don't have time to look at it right now.
>
> However, it's not really something I would suggest. A benchmark is
> something quite fragile. So if you have an IDE using CPU randomly on top of
> it, that would mess up your results a bit.
>
>
> On 6 July 2014 13:18, Vladimir Ozerov <ppozerov at gmail.com> wrote:
>
>> Hi,
>>
>> Is it possible to run JMH from IDE without necessity to generate Maven
>> artifacts? I.e. with just click "Run"?
>>
>> I tried to run it using samples with Runner class, and of course it
>> doesn't
>> work because it searches for /META-INF/BenchmarkList wihch is absent in my
>> project.
>> Therefore, it appears that currently there is no user-friendly way for
>> instant benchmark run from IDE (e.g. for quick algorithm performance
>> assesment). Am I missing something?
>>
>> Vladimir.
>>
>
>
More information about the jmh-dev
mailing list