Files
spring-data-dev-tools/benchmark
Spring Operator b1ad6370fc #107 - URL Cleanup.
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* http://maven.apache.org/xsd/maven-4.0.0.xsd with 4 occurrences migrated to:
  https://maven.apache.org/xsd/maven-4.0.0.xsd ([https](https://maven.apache.org/xsd/maven-4.0.0.xsd) result 200).
* http://maven.apache.org/maven-v4_0_0.xsd with 3 occurrences migrated to:
  https://maven.apache.org/maven-v4_0_0.xsd ([https](https://maven.apache.org/maven-v4_0_0.xsd) result 301).
* http://www.spring.io with 2 occurrences migrated to:
  https://www.spring.io ([https](https://www.spring.io) result 301).
* http://www.spring.io/spring-data with 1 occurrences migrated to:
  https://www.spring.io/spring-data ([https](https://www.spring.io/spring-data) result 301).
* http://oss.sonatype.org/content/repositories/snapshots with 1 occurrences migrated to:
  https://oss.sonatype.org/content/repositories/snapshots ([https](https://oss.sonatype.org/content/repositories/snapshots) result 302).
* http://repo.spring.io/libs-snapshot with 3 occurrences migrated to:
  https://repo.spring.io/libs-snapshot ([https](https://repo.spring.io/libs-snapshot) result 302).

# Ignored
These URLs were intentionally ignored.

* http://maven.apache.org/POM/4.0.0 with 14 occurrences
* http://www.w3.org/2001/XMLSchema-instance with 7 occurrences

Original pull request: #106
2019-03-20 10:23:26 -05:00
..
2019-03-20 10:23:26 -05:00
2019-03-20 10:23:26 -05:00
2019-03-20 10:23:26 -05:00
2019-03-20 10:23:26 -05:00
2018-08-08 10:48:55 +02:00

Benchmarks

Benchmarks are based on JMH.

Running Benchmarks

To run the benchmarks with default settings use:

mvn 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 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 the benchmark command line argument.

mvn 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 clean test -D publishTo=mongodb://127.0.0.1:27017

NOTE: 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 the publishTo command line argument.

mvn clean test -D publishTo=http://127.0.0.1:8080/capture-benchmarks

Customizing Benchmarks

Following options can be set via command line.

Option Default Value
warmupIterations 10
warmupTime 1 (seconds)
measurementIterations 10
measurementTime 1 (seconds)
forks 1
benchmarkReportDir /target/reports/performance (always relative to project root dir)
benchmark .* (single benchmark via classname#benchmark)
publishTo [not set] (mongodb-uri or http-endpoint)