• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

melix / jmh-gradle-plugin / 152
52%
master: 53%

Build:
Build:
LAST BUILD BRANCH: RELEASE_0_5_0_RC_2
DEFAULT BRANCH: master
Ran 05 Jun 2019 09:13PM UTC
Jobs 1
Files 6
Run time 2s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
152

Pull #153

travis-ci

web-flow
Adapt JMH plugin to work with chnages to classpath/classloader in workers in 5.5

Before 5.5, the classpath used to start a worker daemon was a flattened combination
of the Gradle runtime, the worker runnable (and dependencies), and the additional
classpath (which is the benchmark classes + dependencies). This differed from how
the classpath was structured when worker runnables run inside the Gradle daemon.

In 5.5, we changed the worker process to start with a "minimum" class path. This
includes only the Gradle runtime necessary to get work over to the worker process.
Once in the worker process, a separate classloader is created (following the pattern
of classloader isolation in the Gradle daemon). This change should have been transparent
to the worker runnable, except...

In the JMH IsolatedRunner, we create a JMH Runner, pass it some options and call run().
JMH uses the java.class.path system property to derive the classpath of the benchmark.
In 5.5, java.class.path is the classpath of the worker process and nothing else, so JMH
fails quickly due to missing classes.

This change fixes the IsolatedRunner to recreate the classpath expected by JMH and sets
java.class.path before running JMH. The classpath passed to JMH is now only JMH and the
benchmark. It no longer contains the entire Gradle runtime or worker related classes.

This change also removes ExtensionOptions and SerializableOptions because this required
the JMH plugin classes to be passed to the benchmark as well.  We now build a JMH Options
and pass that over to the worker instead.

I suspect that there are still some other lurking issues:
- Embedded benchmark execution probably doesn't work.  I'm not sure if it ever did.
- The benchmark jar shouldn't need to be on the worker classpath
- The benchmark jar doesn't appear to be up-to-date safe
- It's a little weird that we need to use process isolation to run the benchmark, but
  this looks like a missing feature in Gradle and a lack of conf... (continued)
Pull Request #153: Fix JMH plugin to work with 5.5

111 of 111 new or added lines in 4 files covered. (100.0%)

266 of 511 relevant lines covered (52.05%)

0.52 hits per line

Jobs
ID Job ID Ran Files Coverage
1 152.1 05 Jun 2019 09:13PM UTC 0
52.05
Travis Job 152.1
Source Files on build 152
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #152
  • Pull Request #153
  • PR Base - master (#148)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc