Generation of list of benchmarks from IntelliJ IDEA
Evgeny Mandrikov
mandrikov at gmail.com
Mon Jan 12 21:27:35 UTC 2015
I tested following scenario:
a) close IDEA and remove project files
b) rebuild jmh for b99ec1daf32d (hg id -i) with "mvn clean install
-DskipTests"
c) update dependencies in pom.xml of my project for jmh-core
and jmh-generator-annprocess
d) open IDEA, import pom.xml , check dependencies and content
of BenchmarkGenerator from dependencies to be sure that correct version is
picked by IDEA
e) Run MyBenchmark.main() - works
f) Create another class in same package
g) Run MyBenchmark.main() - "no benchmarks"
h) Compile MyBenchmark.java - works as it was before
I'll give a try for a project from archetype in attempt to find
differences, but a bit later.
On Mon, Jan 12, 2015 at 10:06 PM, Aleksey Shipilev <
aleksey.shipilev at oracle.com> wrote:
> On 01/12/2015 11:23 PM, Evgeny Mandrikov wrote:
> > I've tried latest changeset, which includes your changes and
> > unfortunately face the same issue. So probably our testing scenarios are
> > different?
>
> Are you sure you have picked up the changes? You should be using the
> self-built JMH, set the dependency version for both jmh-core and
> jmh-generator-annprocess to 1.5-SNAPSHOT, *and* instruct IDEA to
> re-import the Maven project to pick up the new dependencies.
>
> I have just checked this scenario works:
>
> a) Generate the benchmark from archetype.
> b) Open the benchmark in IDEA.
> c) Put the psvm main() in MyBenchmark.java with JMH API invocation.
> d) Run MyBenchmark.main(), works.
> e) Create new class in Other.java, save.
> f) Run MyBenchmark.main() again, the run fails with "no benchmarks".
>
> g) Go to pom.xml and change jmh.version to 1.5-SNAPSHOT
> h) Make IDEA to re-import the project.
> i) Build->Rebuild Project
> j) Run MyBenchmark.main(), works.
> k) Add Other.m(), save.
> l) Run MyBenchmark.main() again, works!
>
> Repeat steps (k)-(l) or similar, still works.
>
>
> Thanks,
> -Aleksey.
>
>
--
Best regards,
Evgeny Mandrikov aka Godin <http://godin.net.ru>
http://twitter.com/_godin_
More information about the jmh-dev
mailing list