Skip to content
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

Merged
merged 1 commit into from Jul 7, 2016

Conversation

richdougherty
Copy link
Member

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.

# 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"
Copy link
Member

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.

Copy link
Member Author

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.
@gmethvin gmethvin merged commit 07decc9 into playframework:master Jul 7, 2016
@@ -16,6 +16,7 @@ env:
- SCRIPT=testSbtPlugins
- SCRIPT=testDocumentation
- SCRIPT=testTemplates
- SCRIPT=rehearseMicrobenchmarks
Copy link
Member

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?

Copy link
Member Author

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.

@ktoso
Copy link
Member

ktoso commented Jul 7, 2016

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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants