Fwd: Re: FW: Basic JMH questions
Bernd Eckenfels
ecki at zusammenkunft.net
Fri Aug 16 23:02:01 UTC 2024
Hi Ken,
Yes JMH has Javadoc especially on API and Annotations, here for example on @Fork
https://javadoc.io/doc/org.openjdk.jmh/jmh-core/latest/org/openjdk/jmh/annotations/Fork.html
There is however not an official render of the doc, so I always run the maven goal myself on jmh-core.
Warmups are per Fork fork each test, there can also be Warmup Forks or batche warmups.
When running rough tests with larger execution times warmups sometimes overshoot and sometimes using too little warmups also can be an issue, so for the impatient tuning them down helps (more shorter says more about variance). For measures that count I also calculate the number of calls for the iterations to makes sure it gets into hot code terretory (jmh does not warn you)
I learned most about JMH from the official samples they have explaining comments and from Alexeis and Nitsans posts
http://psy-lob-saw.blogspot.com/p/jmh-related-posts.html
jmh.stack.period controls the stack sampling profiler, not sure if it’s worth spending time on it, period in ms!
https://github.com/openjdk/jmh/blob/fedf7639176ea2b3e521950777808701e2c5cc1a/jmh-core/src/main/java/org/openjdk/jmh/profile/StackProfiler.java#L81
Gruss
Bernd
Kenneth Fogel wrote on 16. Aug 2024 20:45 (GMT +02:00):
> (I may have used the wrong email address earlier today so sending this
> again)
I think there is no user mailing list but I we keep the banter lo we might fly under the radar :)
> If there is a better mailing list to ask my questions about the JMH then
> please let me know.
,,,,,
> The first most obvious question is if there are JavaDocs.
,,,
> When is a new JVM spun up for testing? Does it happen for every fork,
,,,
> What does this option mean:
> .jvmArgsAppend("-Djmh.stack.period=1") mean
Gruß
Bernd
—
https://bernd.eckenfels.net
More information about the jmh-dev
mailing list