Jmh benchmark - #89
Open
fmcarvalho wants to merge 2 commits into
Open
Conversation
… to pass unit tests HTML check.
Contributor
Author
|
@jreijn Any update about this? |
Contributor
Author
|
@jreijn Any news about this PR? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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-engineswith 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-pluginconfigured 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 thejarand thetarget\classesinclasspath. 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 4which 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):