Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
AutoJMH is a tool that takes as input one segment of code (belonging to an existing program) and one training execution (could be a unit test run for example) and builds a full JMH microbenchmark for the segment. The tool generates the JMH class and then places the segment code inside the wrapper method, fully generating the microbenchmark. AutoJMH also initializes the variables of the microbenchmark and perform a series of analysis to automatically avoid common microbenchmarking pitfalls.
We start this project because we want to asses the performance of different versions of segments of code belonging to real projects. These segments are in large number and changes constantly due to automated transformations, so it is not feasible to build manually microbenchmarks for them. Aterwards, we realize that it could also be used in industry as a mechanism for regression testing.
AutoJMH works on the assumption that the user wants to measure the performance of the segment under the specific conditions given by the training execution. This could be seen both as a strength and a limitation since it properly reflects a real usage but at the same time can only reproduce the specific cases present in the training execution.
- [Microbenchmark generation process] (https://github.com/autojmh/autojmh-source-code/wiki/Microbenchmark-generation-process)