Bug in Utils.tryWith

Daniel Mitterdorfer daniel.mitterdorfer at gmail.com
Wed May 27 16:13:34 UTC 2015


Hi Aleksandr,

2015-05-27 16:31 GMT+02:00 Aleksandr Dubinsky <adubinsky at almson.net>:

>
>
> Being woefully mistaken about "any hassle with building the actual hsdis
> can be resolved with a tiny bit of following up" is not friendly. (Have you
> tried following any of the several bits of advice on building hsdis? Sure,
> there's lots of instructions. The trouble is none of them work. I wasted a
> whole day. The killer is you need experience in native development on Linux
> to make sense of and fix the errors.)
>

I just use hsdis on Mac (actually for other purposes) and I use a prebuilt
binary. To be honest, I have not yet built hsdis on Linux or Windows. JMH
is just another use case for hsdis and I can perfectly understand that
Aleksey does not want to go to great lengths in documenting on how to build
hsdis on a whole variety of platforms.


> Lastly, requiring users to bundle their benchmarks in a jar and execute
> them from the command-line is a bit unfriendly as well. That said, I was
> happy to discover that I am able to include `jmh-core` and
> `jmh-generator-annprocess` as `<scope>test</scope>` and call Runner inside
> a JUnit test from the IDE with no difference in results. For me, that is
> the most convenient usage and best way to organize my code. You seem to
> warn against that. Are there concrete reasons?
>

Regarding uberjars, see here for an explanation:
http://mail.openjdk.java.net/pipermail/jmh-dev/2014-August/001339.html

I understand your frustration but I don't think it is meant unfriendly.
Actually, JMH is mitigating against the greater risk of invalid benchmark
results, so it's user friendly in the respect that you cannot shoot
yourself in the foot unintentionally. ;)

Bye,

Daniel


More information about the jmh-dev mailing list