dweiss opened a new pull request, #12663: URL: https://github.com/apache/lucene/pull/12663
As per discussion in: https://github.com/apache/lucene/issues/12641 This patch adds the ability to compile JMH microbenchmarks and run them from within Lucene codebase. I didn't use any plugins as they, in my opinion, obscure the view of what's happening and what's needed. I also wanted it to work with the module system and without uber-jars. ``` gradlew -p lucene/benchmark-jmh assemble ``` compiles microbenchmarks with JMH, then displays a short help on what to do next: ``` JMH benchmarks compiled. Run them with: java -jar lucene\benchmark-jmh\build\benchmarks\lucene-benchmark-jmh-10.0.0-SNAPSHOT.jar or java --module-path lucene\benchmark-jmh\build\benchmarks --module org.apache.lucene.benchmark.jmh JMH options you can use with the above: -h displays verbose help for all options -l list available benchmarks -lp list benchmarks that pass the filter and their parameters regexp execute all benchmark containing regexp ``` I didn't add any gradle-specific tasks to run the benchmarks directly - it's technically easy but it seems like a bad idea to fork a subprocess from (quite heavy) gradle when such delicate things are being measured? I'm not sure here. Some future improvements/ remaining issues include: 1) multi-source compilation so that code can be compiled against future APIs (not the one gradle runs with). 2) forbiddenapis doesn't have access to vectors and I had to turn it off, 3) jmh is GPL. It's a dev tool, I don't think it's a problem. I left license checks out of it for the time being. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org