Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To run
spring-comparing-template-engines
with JMH on you local machine just run:And then:
NOTICE use
:
or;
as classpath separator depending on whether you are in linux or windows.There is an issue with
maven-shade-plugin
configured according to JMH that is not including this project's classes (com.jeroenreijn.examples
) in the resultingjar
, i.e.template-engines.jar
. That's why I am providing thejar
and thetarget\classes
inclasspath
. Otherwise, it would be possible to run withjava -jar target\template-engines.jar
.Usually I run JMH with
-f 1 -r 5 -w 5 -i 4 -wi 4
which is fair enough to collect consistent results. Yet, you may change it accordingly:-f
- How many times to fork a single benchmark.-r
- Minimum time to spend at each measurement iteration in seconds.-w
- Minimum time to spend at each warmup iteration in seconds-i
- Number of measurement iterations-wi
- Number of warmup iterationsNOTICE We have here 18 templates correctly measured, missing only JSP which does not produce HTML output because Spring MVC Test doesn't run that servlet container (https://stackoverflow.com/a/37749746/1140754)
Next, you have the results collected in my machine (Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz, Windows 10 Pro, JDK 17.0.2, Java HotSpot(TM) 64-Bit Server VM):