-
Notifications
You must be signed in to change notification settings - Fork 1.1k
DATAMONGO-1720 - Add JMH based benchmark module #483
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
Closed
Closed
Conversation
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
Run the benchmark via the maven profile "benchmarks": mvn -P benchmarks clean test Or run them customized: mvn -P benchmarks -DwarmupIterations=2 -DmeasurementIterations=5 -Dforks=1 clean test
…ime & benchmark to run. Excution time can be set via -D warmupTime= -D measurementTime= Allow selecting a class or a single benchmark via -D benchmark=classname#method. Just skip the method name in order to run all benchmarks of a given class.
Update JavaDoc, rename properties
odrotbohm
reviewed
Jul 11, 2017
} | ||
|
||
@Benchmark // DATAMONGO-1720 | ||
public Customer readObjectWith2tPropertiesAnd1NestedObject() { |
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.
Superfluous "t".
Enhance benchmark statistics with Git/working tree details. Specify byte encoding for JSON to byte encoder. Add status code check to HttpResultsWriter to verify that the results were accepted. Convert spaces to tabs in pom.xml.
backported recent changes to spring-projects/spring-data-mongodb/issue/1.10.x/DATAMONGO-1720 brach. |
4307a2e
to
2ed8c76
Compare
2ed8c76
to
001fcb0
Compare
mp911de
pushed a commit
that referenced
this pull request
Jul 13, 2017
Run the benchmark via the maven profile "benchmarks": mvn -P benchmarks clean test Or run them customized: mvn -P benchmarks -DwarmupIterations=2 -DmeasurementIterations=5 -Dforks=1 clean test Original pull request: #483.
mp911de
added a commit
that referenced
this pull request
Jul 13, 2017
Enhance benchmark statistics with Git/working tree details. Specify byte encoding for JSON to byte encoder. Add status code check to HttpResultsWriter to verify that the results were accepted. Convert spaces to tabs in pom.xml. Original pull request: #483.
mp911de
pushed a commit
that referenced
this pull request
Jul 13, 2017
Run the benchmark via the maven profile "benchmarks": mvn -P benchmarks clean test Or run them customized: mvn -P benchmarks -DwarmupIterations=2 -DmeasurementIterations=5 -Dforks=1 clean test Origin pull request: #483.
mp911de
added a commit
that referenced
this pull request
Jul 13, 2017
Enhance benchmark statistics with Git/working tree details. Specify byte encoding for JSON to byte encoder. Add status code check to HttpResultsWriter to verify that the results were accepted. Convert spaces to tabs in pom.xml. Original pull request: #483.
mp911de
pushed a commit
that referenced
this pull request
Jul 13, 2017
Run the benchmark via the maven profile "benchmarks": mvn -P benchmarks clean test Or run them customized: mvn -P benchmarks -DwarmupIterations=2 -DmeasurementIterations=5 -Dforks=1 clean test Original pull request: #483.
mp911de
added a commit
that referenced
this pull request
Jul 13, 2017
Enhance benchmark statistics with Git/working tree details. Specify byte encoding for JSON to byte encoder. Add status code check to HttpResultsWriter to verify that the results were accepted. Convert spaces to tabs in pom.xml. Original pull request: #483.
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.
Running Benchmarks
Running benchmarks is disabled by default and can be activated via the
benchmarks
profile.To run the benchmarks with default settings use.
mvn -P benchmarks clean test
A basic report will be printed to the CLI.
# Run complete. Total time: 00:00:15 Benchmark Mode Cnt Score Error Units MappingMongoConverterBenchmark.readObject thrpt 10 1920157,631 ± 64310,809 ops/s MappingMongoConverterBenchmark.writeObject thrpt 10 782732,857 ± 53804,130 ops/s
Running all Benchmarks of a specific class
To run all Benchmarks of a specific class, just provide its simple class name via the
benchmark
command line argument.mvn -P benchmarks clean test -D benchmark=MappingMongoConverterBenchmark
Running a single Benchmark
To run a single Benchmark provide its containing class simple name followed by
#
and the method name via thebenchmark
command line argument.mvn -P benchmarks clean test -D benchmark=MappingMongoConverterBenchmark#readObjectWith2Properties
Saving Benchmark Results
A detailed benchmark report is stored in JSON format in the
/target/reports/performance
directory.To store the report in a different location use the
benchmarkReportDir
command line argument.MongoDB
Results can be directly piped to MongoDB by providing a valid Connection String via the
publishTo
command line argument.mvn -P benchmarks clean test -D publishTo=mongodb://127.0.0.1:27017
ℹ️ If the uri does not explicitly define a database the default
spring-data-mongodb-benchmarks
is used.HTTP Endpoint
The benchmark report can also be posted as
application/json
to an HTTP Endpoint by providing a valid URl via thepublishTo
command line argument.mvn -P benchmarks clean test -D publishTo=http://127.0.0.1:8080/capture-benchmarks
Customizing Benchmarks
Following options can be set via command line.
classname#benchmark
)