Skip to content

Files

Latest commit

d89e1cc · Jan 22, 2021

History

History
This branch is 11763 commits behind aws/aws-sdk-java-v2:master.

sdk-benchmarks

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Dec 7, 2020
Mar 28, 2019
Jan 22, 2021

Sdk Benchmark Harness

This module contains sdk benchmark harness using JMH.

Each benchmark class has a set of default JMH configurations tailored to SDK's build job and you might need to adjust them based on your test environment such as increasing warmup iterations or measurement time in order to get more reliable data.

There are three ways to run benchmarks.

  • Using the executable JAR (Preferred usage per JMH site)
mvn clean install -P quick -pl :sdk-benchmarks --am

# Run specific benchmark
java -jar target/benchmarks.jar ApacheHttpClientBenchmark

# Run all benchmarks: 3 warm up iterations, 3 benchmark iterations, 1 fork
java -jar target/benchmarks.jar -wi 3 -i 3 -f 1
  • Usingmvn exec:exec commands to invoke BenchmarkRunner main method
   mvn clean install -P quick -pl :sdk-benchmarks --am
   mvn clean install -pl :bom-internal
   cd test/sdk-benchmarks
   mvn exec:exec
  • From IDE

    You can run the main method within each Benchmark class from your IDE. If you are using Eclipse, you might need to set up build configurations for JMH annotation, please check JMH. Note that the benchmark result from IDE might not be as reliable as the above approaches and is generally not recommended.