Skip to content

Commit 14ce677

Browse files
committed
Add Http client bench marks with S3 Get/Put
1 parent 3a51be0 commit 14ce677

File tree

12 files changed

+1366
-0
lines changed

12 files changed

+1366
-0
lines changed

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
<module>test/test-utils</module>
8080
<module>test/codegen-generated-classes-test</module>
8181
<module>test/sdk-benchmarks</module>
82+
<module>test/http-client-benchmarks</module>
8283
<module>test/module-path-tests</module>
8384
<module>test/tests-coverage-reporting</module>
8485
<module>test/stability-tests</module>

test/http-client-benchmarks/README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Sdk Benchmark Harness
2+
3+
4+
This module contains sdk benchmark harness using [JMH].
5+
6+
Each benchmark class has a set of default
7+
JMH configurations tailored to SDK's build job and you might need to
8+
adjust them based on your test environment such as increasing warmup iterations
9+
or measurement time in order to get more reliable data.
10+
11+
There are three ways to run benchmarks.
12+
13+
- Using the executable JAR (Preferred usage per JMH site)
14+
```bash
15+
mvn clean install -P quick -pl :sdk-benchmarks --am
16+
17+
# Run specific benchmark
18+
java -jar target/benchmarks.jar ApacheHttpClientBenchmark
19+
20+
# Run all benchmarks: 3 warm up iterations, 3 benchmark iterations, 1 fork
21+
java -jar target/benchmarks.jar -wi 3 -i 3 -f 1
22+
```
23+
24+
- Using`mvn exec:exec` commands to invoke `UnifiedBenchmarkRunner` main method
25+
```bash
26+
mvn clean install -P quick -pl :sdk-benchmarks --am
27+
mvn clean install -pl :bom-internal
28+
cd test/sdk-benchmarks
29+
mvn exec:exec
30+
```
31+
32+
- From IDE
33+
34+
You can run the main method within each Benchmark class from your IDE. If you are using Eclipse, you might need to
35+
set up build configurations for JMH annotation, please check [JMH]. Note that the benchmark result from IDE
36+
might not be as reliable as the above approaches and is generally not recommended.
37+
38+
[JMH]: http://openjdk.java.net/projects/code-tools/jmh/

0 commit comments

Comments
 (0)