Closed cpovirk closed 1 year ago
@cpovirk could you please specify why JMH is recommended over Caliper? I am analyzing various tools available for writing benchmark tests, and it would be good to know why should I use JMH over Caliper.
The best explanation I have handy is https://groups.google.com/g/mechanical-sympathy/c/m4opvy4xq3U/m/7lY8x8SvHgwJ?pli=1
Is it still relevant, as most comments are from 6yrs ago
I don't think we have addressed any of the issues discussed there in the last ~4~ 6 years. If anything, JMH has probably widened its lead over Caliper in that time. (Our focus has been on Android, where we can't use JMH, and on general maintenance.)
(In everything I'm saying here, I'm focused on benchmarks of runtime. I don't know what JMH does for allocation benchmarks.)
Sorry, typo: I don't think we have addressed any of those issues in the last 6 years.
Thank you so much, this was really helpful
A Caliper alternative on Android is the Jetpack Benchmark library (via). We should say something about that, too.
My understanding is that our recommendation is that people should use JMH. We make an exception for Android (where JMH doesn't work), but I don't think Caliper works under Android externally, so we wouldn't need to cover that here.
(I recall discussing years ago how it would be nice if we could import JMH data into Caliper's pivot-table UI, but it's clear that's not happening anytime soon.)