Running mecirobenchmarks from IDE
Millies, Sebastian
Sebastian.Millies at softwareag.com
Mon Jul 7 08:28:11 UTC 2014
Hi Vladimir,
you haven't said what IDE you use. For me, the following works in Eclipse Kepler:
· Enable annotation processing (Preferences -> Java Compiler -> Annotation Processing)
· Add jmh-core and jmh-generator-annprocess to the factory path (Preferences -> Java Compiler -> Annotation Processing -> Factory Path)
· Add the same jars to the project build path
· Add runtime jars (commons-math, jopt-simple etc.) to the runtime classpath in the launch configuration for the benchmark class
Best,
Sebastian
-----Original Message-----
From: jmh-dev [mailto:jmh-dev-bounces at openjdk.java.net] On Behalf Of FELIX YANG
Sent: Monday, July 07, 2014 4:14 AM
To: Vladimir Ozerov; jmh-dev at openjdk.java.net
Subject: Re: Running mecirobenchmarks from IDE
Hi Vladimir,
there may be. My workaround :
1. add target/generated-sources/annotations, and target/classes as source folders.
2. add jar files into libraries, inlcuding commons-math3-3.2. jar, jmh-core-xx.jar, jmh-core-benchmarks-xx.jar and jmh-generator-annprocess-xx.jar and jmh-generator-reflection-xx.jar
Then you can run a test (for instance, JMHSample_01_HelloWorld) as usual Java Application from IDE.
-Felix
On 7/6/2014 7:18 PM, Vladimir Ozerov 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.
Software AG – Sitz/Registered office: Uhlandstraße 12, 64297 Darmstadt, Germany – Registergericht/Commercial register: Darmstadt HRB 1562 - Vorstand/Management Board: Karl-Heinz Streibich (Vorsitzender/Chairman), Dr. Wolfram Jost, Arnd Zinnhardt; - Aufsichtsratsvorsitzender/Chairman of the Supervisory Board: Dr. Andreas Bereczky - http://www.softwareag.com
More information about the jmh-dev
mailing list