New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add some microbenchmarks #6297
Add some microbenchmarks #6297
Conversation
# Just run single iteration of microbenchmark to make sure that they | ||
# run properly. The results will be inaccurate, but this ensures that | ||
# the microbenchmarks at least compile and run. | ||
build "$@" "${CROSSBUILD} Play-Microbenchmark/jmh:run -i 1 -wi 0 -f 1 -t 1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this could be separated to its own build job.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK I've changed to use a separate build job now.
The microbenchmarks have been added in a new Play subproject called Play-Microbenchmark. The microbenchmarks are executed using JMH via the sbt-jmh plugin. They can be run with the `jmh:run` command. I've added a few simple benchmarks to show how they are implemented.
36f183c
to
cf34302
Compare
@@ -16,6 +16,7 @@ env: | |||
- SCRIPT=testSbtPlugins | |||
- SCRIPT=testDocumentation | |||
- SCRIPT=testTemplates | |||
- SCRIPT=rehearseMicrobenchmarks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure you need them during travis?
travis are weak boxes usually, not much sense to measure on them.
maybe just compile the JMH sources?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not a measurement test, just a single-shot run to check that there are no compile or runtime errors.
Seems most benchmarks make the mistake of not consuming the result, this is scary as the JVM sometimes may figure out "too much" and you get better numbers that are the reality |
@@ -471,6 +483,7 @@ object PlayBuild extends Build { | |||
PlayDocsProject, | |||
PlayFiltersHelpersProject, | |||
PlayIntegrationTestProject, | |||
PlayMicrobenchmarkProject, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps not. If the build completes without this, while still compiling the microbenchmarks, then we can remove it. Do you want to try?
The microbenchmarks have been added in a new Play subproject called Play-Microbenchmark. The microbenchmarks are executed using JMH via the sbt-jmh plugin. They can be run with the
jmh:run
command. I've added a few simple benchmarks to show how they are implemented.Cc @gmethvin, @wsargent, @ktoso.