Skip to content

Apache5x SDkBenhmark Tests #6206

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

Conversation

joviegas
Copy link
Contributor

@joviegas joviegas commented Jun 24, 2025

Motivation and Context

  • Added Apache5x client type in ApacheHttpClientBenchmark

Modifications

  • Added clientType as Apache4 and Apache5
  • Added StreamingMockServlet to simulate streaming

Testing

mvn clean compile package -pl :s3-benchmarks  -P quick --am -rf :s3-benchmarks

java -jar /home/joviegas/sdk-benchmarks.jar ApacheHttpClientBenchmark 


Benchmark                                                     (clientType)   Mode  Cnt      Score     Error  Units
ApacheHttpClientBenchmark.concurrentApiCall                        apache4  thrpt   10  17867.578 ± 290.078  ops/s
ApacheHttpClientBenchmark.concurrentApiCall                        apache5  thrpt   10  17554.314 ± 195.906  ops/s
ApacheHttpClientBenchmark.concurrentStreamingOutputOperation       apache4  thrpt   10    486.650 ±   4.740  ops/s
ApacheHttpClientBenchmark.concurrentStreamingOutputOperation       apache5  thrpt   10    483.521 ±   9.385  ops/s
ApacheHttpClientBenchmark.concurrentStreamingPutOperation          apache4  thrpt   10    134.818 ±   5.919  ops/s
ApacheHttpClientBenchmark.concurrentStreamingPutOperation          apache5  thrpt   10    135.640 ±   7.070  ops/s
ApacheHttpClientBenchmark.sequentialApiCall                        apache4  thrpt   10   2524.759 ±  35.886  ops/s
ApacheHttpClientBenchmark.sequentialApiCall                        apache5  thrpt   10   2493.746 ±  37.413  ops/s
ApacheHttpClientBenchmark.streamingOutputOperation                 apache4  thrpt   10     88.494 ±   1.228  ops/s
ApacheHttpClientBenchmark.streamingOutputOperation                 apache5  thrpt   10     88.532 ±   1.031  ops/s
ApacheHttpClientBenchmark.streamingPutOperation                    apache4  thrpt   10     21.487 ±   0.147  ops/s
ApacheHttpClientBenchmark.streamingPutOperation                    apache5  thrpt   10     21.479 ±   0.162  ops/s

Benchmark Apache4 (ops/s) Apache5 (ops/s) Performance Comparison
concurrentApiCall 17,867.578 17,554.314 Apache4 better by 1.75%
concurrentStreamingOutputOperation 486.650 483.521 Apache4 better by 0.64%
concurrentStreamingPutOperation 134.818 135.640 Apache5 better by 0.61%
sequentialApiCall 2,524.759 2,493.746 Apache4 better by 1.23%
streamingOutputOperation 88.494 88.532 Apache5 better by 0.04%
streamingPutOperation 21.487 21.479 Apache4 better by 0.04%

License

  • I confirm that this pull request can be released under the Apache 2 license

joviegas and others added 23 commits May 29, 2025 09:55
… is implementation of HttpClientConnectionManager
…ring content reference to avoid multiple ContentStreamProvider.newStream() calls that cause IOException when retrying requests with non-resettable streams
…e is value is set to 0 since 0 is treated as Infinite timeToLive in Sdk and Apache 4.x but treated as immediate closeConnection in apache 5.x
…o define Apache5 dependencies in .brazil.json
…cause memory issue, this behaviour is same as Apache4.x
@joviegas joviegas requested a review from a team as a code owner June 24, 2025 21:38
response.setCharacterEncoding("UTF-8");
response.setHeader("x-amz-request-id", "json-" + System.currentTimeMillis());

String jsonResponse = "{"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dumy responses this will make sure the Client will call the ResponseBody.getContent and test Nenchmarks how the client buffers

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
59.7% Coverage on New Code (required ≥ 80%)
20.1% Duplication on New Code (required ≤ 3%)
B Security Rating on New Code (required ≥ A)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Copy link
Contributor

@S-Saranya1 S-Saranya1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@joviegas joviegas merged commit e188995 into feature/master/apache5x Jun 26, 2025
26 of 27 checks passed
Copy link

This pull request has been closed and the conversation has been locked. Comments on closed PRs are hard for our team to see. If you need more assistance, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 26, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants