-
Notifications
You must be signed in to change notification settings - Fork 931
http-client-benchmark with Apache SDK client added #6256
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
Merged
+1,694
−4
Merged
Changes from all commits
Commits
Show all changes
83 commits
Select commit
Hold shift + click to select a range
f3fc974
Add initial empty module for Apache5x for seting up package (#6075)
joviegas 5092cc4
Baseline or Copy all the ApacheSDKHttpClient classes to newly added A…
joviegas 6e9939f
Phase 2 , getting Apache 5 compilation and Junit ready along with cle…
joviegas 4dda3f7
Merge branch 'master' into feature/master/apache5x
joviegas 3053d09
Update the snap shot
joviegas 985ca35
Fix HTTP authentication retry failures by improving RepeatableInputSt…
joviegas b97c9da
Merge branch 'master' into feature/master/apache5x
joviegas 64f7d33
Updated snap shot after merge from master
joviegas 24438e8
Revert "Updated snap shot after merge from master"
joviegas 62150d6
Updated snap shot after merge from master
joviegas fbfb70f
Fix architecture test failures for apache5.x (#6140)
joviegas 3c4433c
Merge branch 'master' into feature/master/apache5x
joviegas 6d8b5f4
Updated snap shot after merge from master
joviegas 13c5796
Use reference of PoolingHttpClientConnectionManager instead of HttpCl…
joviegas 0bdf878
Merge branch 'master' into feature/master/apache5x
joviegas 265976d
Fix Apache5 HTTP client retry failures with non-resettable streams (#…
joviegas 4671831
Merge branch 'master' into feature/master/apache5x
joviegas 2f72282
Merge branch 'master' into feature/master/apache5x
joviegas 79f6f0f
Merge PR#6165 https://github.com/aws/aws-sdk-java-v2/pull/6165
joviegas fcbc3c0
Disable Client based retries and define httpcore5 httpclient5 in .bra…
joviegas 716a6db
Merge branch 'master' into feature/master/apache5x
joviegas 09e8ee4
Update snapshots
joviegas ad30c25
Merge branch 'feature/master/apache5x' of github.com:aws/aws-sdk-java…
joviegas 3cedfb1
Do not buffer the Response stream using BufferedHttpEntity (#6200)
joviegas 959605c
Merge branch 'master' into feature/master/apache5x
joviegas a959581
Merge from master
joviegas e188995
Apache5x SDkBenhmark Tests (#6206)
joviegas 3cc94bb
Clean up unused APIs and add test to make sure it can be handled with…
joviegas 45f630d
Merge branch 'master' into feature/master/apache5x
joviegas 67d6690
Upgrade Apache5 org.apache.httpcomponents.client5 to latest available…
joviegas c3cb46f
Preview API annotation added for Public APIs and TODOs addressed (#6215)
joviegas bb372da
Merge branch 'master' into feature/master/apache5x
joviegas d336053
Updated the snapshot
joviegas 397f330
Updated thr Brazil package nma e to have preview as suffix
joviegas a21356a
Updated Version as -PREVIEW to release apache5 as preview release (#6…
joviegas 1b1caa0
Handled Surface API review comments
joviegas 8f086d7
Added a single test for localaddress , handled review comments
joviegas 286b515
Removing internal package name as -preview after internal discussion
joviegas 1b520dc
Fix transient text case failures
joviegas 4aa1fdb
Handled Surface API review comments (#6224)
joviegas 28a6b06
Merge branch 'feature/master/apache5x' into joviegas/post-surface-api…
joviegas 198a814
Merge branch 'master' into feature/master/apache5x
joviegas 661b152
update pom.xml for apache5.x
joviegas 2d727fa
Merge branch 'feature/master/apache5x' into joviegas/post-surface-api…
joviegas 3a51be0
Handled comment for merge to master PR for apache 5.x
joviegas 251490c
Handled commed for merge to master PR 6220 (#6240)
joviegas 7a7e4cd
Merge branch 'master' into feature/master/apache5x
joviegas 6383c44
Added change logs
joviegas 14ce677
Add Http client bench marks with S3 Get/Put
joviegas 8e7ce75
Removed some dependencies
joviegas ee93292
Merge branch 'master' into feature/master/apache5x
joviegas 5061901
updated performance comparison logic
joviegas 4d88a3e
updated readme
joviegas 0dd8786
Merge branch 'feature/master/apache5x' into joviegas/post-surface-api…
joviegas 6dda6bd
updated warmup time and iterations
joviegas 3f4ba25
remove performance comparison since we already have printed performam…
joviegas 4833db9
Review from github
joviegas 061b5fb
Review comment
joviegas 59ac21f
updatded prints
joviegas f26f7bb
Handled Review comments
joviegas dfcfdcb
Merge branch 'master' into feature/master/apache5x
joviegas 7d27844
Added performance comparison for Apache
joviegas 305c62b
updated README
joviegas 1acd510
remove preview buid
joviegas 5d78ede
Merge branch 'feature/master/apache5x' into joviegas/post-surface-api…
joviegas 807ad9f
added changed to skpi http client benchmark
joviegas d382185
updated the snapshot version
joviegas 78ac2e2
updated to run on jdk8
joviegas 9d1255b
merge from master
joviegas 422d197
merge from master
joviegas 832b52c
updated README.md
joviegas 29ab8d9
fixed checkbuild issues
joviegas 99e697e
fixed checksyle issues
joviegas b536571
fixed issue where secondary benchmarks were not found
joviegas 1d2a5b5
Revert "fixed issue where secondary benchmarks were not found"
joviegas c7dff89
Revert "fixed checksyle issues"
joviegas ad00477
Fixed checkstyle issues
joviegas 12b37f4
Handled review comments
joviegas 53565ac
Merge branch 'master' into joviegas/post-surface-api-review
joviegas 1887fac
Updated snapshot
joviegas f766caf
Merge branch 'master' into joviegas/post-surface-api-review
joviegas 51018d4
Add skipping of http-client-benchmarks in validate-brazil-config.yml
joviegas c6483a3
updated snapshot
joviegas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# HTTP Client Benchmark Harness | ||
|
||
This module contains HTTP client benchmark harness using [JMH]. | ||
|
||
Each benchmark class has a set of default | ||
JMH configurations tailored to HTTP client performance testing 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 :http-client-benchmarks --am | ||
``` | ||
|
||
# Run specific benchmark | ||
``` | ||
java -jar target/http-client-benchmarks.jar Apache5Benchmark | ||
``` | ||
|
||
# Run all benchmarks: 3 warm up iterations, 3 benchmark iterations, 1 fork. | ||
``` | ||
java -jar target/http-client-benchmarks.jar -wi 3 -i 3 -f 1 | ||
``` | ||
|
||
- Using `mvn exec:exec` commands to invoke `UnifiedBenchmarkRunner` main method | ||
``` | ||
mvn clean install -P quick -pl :http-client-benchmarks --am | ||
mvn clean install -pl :bom-internal | ||
cd test/http-client-benchmarks | ||
mvn exec:exec | ||
``` | ||
|
||
## UnifiedBenchmarkRunner | ||
|
||
The `UnifiedBenchmarkRunner` provides a comprehensive comparison between different HTTP client implementations: | ||
|
||
- **Apache4**: Apache HttpClient 4.x baseline | ||
- **Apache5-Platform**: Apache HttpClient 5.x with platform threads | ||
- **Apache5-Virtual**: Apache HttpClient 5.x with virtual threads | ||
|
||
The runner executes all benchmark variations, prints metrics to console, and publishes results to CloudWatch metrics for monitoring and analysis. | ||
|
||
## Benchmark Operations | ||
|
||
Each benchmark implementation tests the following operations: | ||
- `simpleGet`: Single-threaded GET operations | ||
- `simplePut`: Single-threaded PUT operations | ||
- `multiThreadedGet`: Multi-threaded GET operations (10 threads) | ||
- `multiThreadedPut`: Multi-threaded PUT operations (10 threads) | ||
|
||
## Prerequisites | ||
|
||
### Java Runtime Requirements | ||
|
||
- **Java 8+**: Required for running the benchmarks (as specified by `<javac.target>8</javac.target>`) | ||
- **Java 21+**: Required for virtual threads support (Apache5-Virtual benchmarks) | ||
|
||
**Note**: Virtual threads are a preview feature in Java 19-20 and became stable in Java 21. The Apache5-Virtual benchmarks require Java 21 or later. | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,262 @@ | ||
<!-- | ||
~ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
~ | ||
~ Licensed under the Apache License, Version 2.0 (the "License"). | ||
~ You may not use this file except in compliance with the License. | ||
~ A copy of the License is located at | ||
~ | ||
~ http://aws.amazon.com/apache2.0 | ||
~ | ||
~ or in the "license" file accompanying this file. This file is distributed | ||
~ on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
~ express or implied. See the License for the specific language governing | ||
~ permissions and limitations under the License. | ||
--> | ||
|
||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>software.amazon.awssdk</groupId> | ||
<artifactId>aws-sdk-java-pom</artifactId> | ||
<version>2.32.6-SNAPSHOT</version> | ||
<relativePath>../../pom.xml</relativePath> | ||
</parent> | ||
|
||
<artifactId>http-client-benchmarks</artifactId> | ||
<packaging>jar</packaging> | ||
|
||
<name>AWS Java SDK :: Test :: HTTP CLIENT Benchmarks</name> | ||
<description>Contains JMH benchmark code for the SDK HTTP CLIENTS</description> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<jmh.version>1.37</jmh.version> | ||
<javac.target>1.8</javac.target> | ||
<uberjar.name>http-client-benchmarks</uberjar.name> | ||
<exec-maven-plugin.version>1.6.0</exec-maven-plugin.version> | ||
</properties> | ||
|
||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.openjdk.jmh</groupId> | ||
<artifactId>jmh-core</artifactId> | ||
<version>${jmh.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.openjdk.jmh</groupId> | ||
<artifactId>jmh-generator-annprocess</artifactId> | ||
<version>${jmh.version}</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
<!-- AWS SDK Dependencies --> | ||
<dependency> | ||
<groupId>software.amazon.awssdk</groupId> | ||
<artifactId>s3</artifactId> | ||
<version>${awsjavasdk.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>software.amazon.awssdk</groupId> | ||
<artifactId>cloudwatch</artifactId> | ||
<version>${awsjavasdk.version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>software.amazon.awssdk</groupId> | ||
<artifactId>apache-client</artifactId> | ||
<version>${awsjavasdk.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>software.amazon.awssdk</groupId> | ||
<artifactId>apache5-client</artifactId> | ||
<version>${awsjavasdk.version}-PREVIEW</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.apache.logging.log4j</groupId> | ||
<artifactId>log4j-api</artifactId> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.logging.log4j</groupId> | ||
<artifactId>log4j-core</artifactId> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.logging.log4j</groupId> | ||
<artifactId>log4j-slf4j-impl</artifactId> | ||
<scope>compile</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>software.amazon.awssdk</groupId> | ||
<artifactId>bom-internal</artifactId> | ||
<version>${awsjavasdk.version}</version> | ||
<type>pom</type> | ||
<scope>import</scope> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
|
||
<build> | ||
<resources> | ||
<resource> | ||
<directory>src/main/resources</directory> | ||
</resource> | ||
</resources> | ||
<pluginManagement> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>3.1</version> | ||
<!-- Override the configuration in the parent--> | ||
<configuration combine.self="override"> | ||
<compilerVersion>${javac.target}</compilerVersion> | ||
<source>${javac.target}</source> | ||
<target>${javac.target}</target> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>compile</id> | ||
<phase>none</phase> | ||
</execution> | ||
</executions> | ||
<inherited>false</inherited> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-clean-plugin</artifactId> | ||
<version>3.1.0</version> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-deploy-plugin</artifactId> | ||
<version>2.8.1</version> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-install-plugin</artifactId> | ||
<version>2.5.1</version> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-jar-plugin</artifactId> | ||
<version>2.4</version> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-javadoc-plugin</artifactId> | ||
<version>2.9.1</version> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-resources-plugin</artifactId> | ||
<version>2.6</version> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-site-plugin</artifactId> | ||
<version>3.3</version> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-source-plugin</artifactId> | ||
<version>2.2.1</version> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
<version>2.17</version> | ||
</plugin> | ||
</plugins> | ||
</pluginManagement> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-shade-plugin</artifactId> | ||
<version>2.2</version> | ||
<executions> | ||
<execution> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>shade</goal> | ||
</goals> | ||
<configuration> | ||
<finalName>${uberjar.name}</finalName> | ||
<createDependencyReducedPom>false</createDependencyReducedPom> | ||
<artifactSet> | ||
<includes> | ||
<include>*:*</include> | ||
</includes> | ||
</artifactSet> | ||
<transformers> | ||
<transformer | ||
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> | ||
<manifestEntries> | ||
<Main-Class>org.openjdk.jmh.Main</Main-Class> | ||
</manifestEntries> | ||
</transformer> | ||
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/> | ||
</transformers> | ||
<filters> | ||
<filter> | ||
<!-- | ||
Shading signed JARs will fail without this. | ||
http://stackoverflow.com/questions/999489/invalid-signature-file-when-attempting-to-run-a-jar | ||
--> | ||
<artifact>*:*</artifact> | ||
<excludes> | ||
<exclude>META-INF/*.SF</exclude> | ||
<exclude>META-INF/*.DSA</exclude> | ||
<exclude>META-INF/*.RSA</exclude> | ||
</excludes> | ||
</filter> | ||
</filters> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<!-- Need to use exec not java see:http://mail.openjdk.java.net/pipermail/jmh-dev/2014-July/001192.html, https://stackoverflow.com/questions/15013651/using-maven-execexec-with-arguments --> | ||
<artifactId>exec-maven-plugin</artifactId> | ||
<version>${exec-maven-plugin.version}</version> | ||
<configuration> | ||
<executable>java</executable> | ||
<arguments> | ||
<argument>-classpath</argument> | ||
<classpath/> | ||
<argument>software.amazon.awssdk.benchmark.UnifiedBenchmarkRunner</argument> | ||
<!-- Fail process on failed benchmarks --> | ||
<argument>-c</argument> | ||
</arguments> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>com.github.spotbugs</groupId> | ||
<artifactId>spotbugs-maven-plugin</artifactId> | ||
<configuration> | ||
<!-- Skipping spotbugs for the generated JMH classes--> | ||
<skip>true</skip> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-dependency-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>analyze-only</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
<configuration> | ||
<!-- Skipping maven dependencies analysis to speed up the build --> | ||
<skip>true</skip> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Can you update the buildspec as well?
aws-sdk-java-v2/buildspecs/validate-brazil-config.yml
Line 12 in cea37da
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.
Thanks