[ 
https://issues.apache.org/jira/browse/SOLR-15428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17380657#comment-17380657
 ] 

Mark Robert Miller commented on SOLR-15428:
-------------------------------------------

Jmh integration

Why?

Micro-benchmarks are hard. jmh comes from OpenJDK and is widely used.

What about the work building on the Lucene Benchmark module?

That was a fruitful path, but came with some downsides:
* You had to learn the algorithm syntax.
* You had to map solrj functionality to algorithm syntax.
* The solrj bias is limiting.
* Overall, less suited for low level micro-benchmarks, steeper learning curve, 
historical perspective says there won’t be a lot of developer activity.

With jmh, low level micro-benchmarking is simple and testing single actions 
against a MiniCluster is viable and I have later found out, not treading new 
ground.

The benchmarks are not solrj biased, graphing and sharing results is simple, 
treating benchmarks like unit tests is relatively straightforward, jmh is 
widely used and developer adoption is much simpler overall.

Why not use the jmh Gradle plugin?

The jmh build plugins generally work by creating a large single jar with 
shading. This is both costly and not always simple with our Gradle build setup. 
With a more direct jmh Gradle integration, we can avoid the ‘fat’ jar and 
shadowing and directly pass the correct information from the build to jmh. This 
was a bit tricky with our build to work out, but its straightforward and a 
small amount of Gradle.

> Integrate the OpenJDK JMH micro benchmark framework for micro benchmarks and 
> performance comparisons and investigation.
> -----------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-15428
>                 URL: https://issues.apache.org/jira/browse/SOLR-15428
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Mark Robert Miller
>            Priority: Major
>         Attachments: bench.patch
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> I’ve spent a fair amount of time over the years on work around integrating 
> Lucene’s benchmark framework into Solr and while I’ve used this with 
> additional local work off and on, JMH has become somewhat of a standard for 
> micro benchmarks on the JVM. I have some work that provides an initial 
> integration, allowing for more targeted micro benchmarks as well as more 
> integration type benchmarking using JettySolrRunner. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to