Skip to content

Commit 3f4ba25

Browse files
committed
remove performance comparison since we already have printed performamnce and one sent to cw
1 parent 6dda6bd commit 3f4ba25

File tree

3 files changed

+5
-138
lines changed

3 files changed

+5
-138
lines changed

test/http-client-benchmarks/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ The `UnifiedBenchmarkRunner` provides a comprehensive comparison between differe
3737
- **Apache5-Platform**: Apache HttpClient 5.x with platform threads
3838
- **Apache5-Virtual**: Apache HttpClient 5.x with virtual threads
3939

40-
The runner executes all benchmark variations, publishes metrics to CloudWatch, and generates a detailed comparison report showing performance improvements between implementations.
40+
The runner executes all benchmark variations, prints and publishes metrics to CloudWatch.
4141

4242
## Benchmark Operations
4343

test/http-client-benchmarks/pom.xml

Lines changed: 4 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -26,34 +26,18 @@
2626
<artifactId>http-client-benchmarks</artifactId>
2727
<packaging>jar</packaging>
2828

29-
<name>AWS Java SDK :: Test :: SDK Benchmarks</name>
30-
<description>Contains JMH benchmark code for the SDK</description>
29+
<name>AWS Java SDK :: Test :: HTTP CLIENT Benchmarks</name>
30+
<description>Contains JMH benchmark code for the SDK HTTP CLIENTS</description>
3131

3232
<properties>
3333
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
34-
<jmh.version>1.21</jmh.version>
35-
<maven.compiler.source>21</maven.compiler.source>
36-
<maven.compiler.target>21</maven.compiler.target>
37-
<maven.compiler.release>21</maven.compiler.release>
38-
<!--
39-
JMH version to use with this project.
40-
-->
4134
<jmh.version>1.37</jmh.version>
42-
43-
<!--
44-
Java source/target to use for compilation.
45-
-->
4635
<javac.target>21</javac.target>
47-
48-
<!--
49-
Name of the benchmark Uber-JAR to generate.
50-
-->
51-
<uberjar.name>benchmarks</uberjar.name>
52-
53-
<sdk-v1.version>1.11.404</sdk-v1.version>
36+
<uberjar.name>http-client-benchmarks</uberjar.name>
5437
<exec-maven-plugin.version>1.6.0</exec-maven-plugin.version>
5538
</properties>
5639

40+
5741
<dependencies>
5842
<dependency>
5943
<groupId>org.openjdk.jmh</groupId>
@@ -79,20 +63,6 @@
7963
<version>${awsjavasdk.version}</version>
8064
</dependency>
8165

82-
<dependency>
83-
<groupId>com.amazonaws</groupId>
84-
<artifactId>aws-java-sdk-core</artifactId>
85-
<version>${sdk-v1.version}</version>
86-
</dependency>
87-
88-
89-
<dependency>
90-
<groupId>software.amazon.awssdk</groupId>
91-
<artifactId>sdk-core</artifactId>
92-
<version>${awsjavasdk.version}</version>
93-
</dependency>
94-
95-
9666
<dependency>
9767
<groupId>software.amazon.awssdk</groupId>
9868
<artifactId>apache-client</artifactId>
@@ -119,45 +89,6 @@
11989
<artifactId>log4j-slf4j-impl</artifactId>
12090
<scope>compile</scope>
12191
</dependency>
122-
<dependency>
123-
<groupId>org.eclipse.jetty</groupId>
124-
<artifactId>jetty-servlet</artifactId>
125-
</dependency>
126-
<dependency>
127-
<groupId>org.eclipse.jetty</groupId>
128-
<artifactId>jetty-server</artifactId>
129-
</dependency>
130-
<dependency>
131-
<groupId>org.eclipse.jetty.http2</groupId>
132-
<artifactId>http2-server</artifactId>
133-
</dependency>
134-
<dependency>
135-
<groupId>org.eclipse.jetty</groupId>
136-
<artifactId>jetty-alpn-java-server</artifactId>
137-
</dependency>
138-
<dependency>
139-
<groupId>org.eclipse.jetty.http2</groupId>
140-
<artifactId>http2-hpack</artifactId>
141-
</dependency>
142-
143-
144-
<dependency>
145-
<groupId>commons-cli</groupId>
146-
<artifactId>commons-cli</artifactId>
147-
<scope>compile</scope>
148-
</dependency>
149-
<dependency>
150-
<groupId>software.amazon.awssdk</groupId>
151-
<artifactId>cloudwatch</artifactId>
152-
<version>${awsjavasdk.version}</version>
153-
<scope>compile</scope>
154-
</dependency>
155-
<dependency>
156-
<groupId>software.amazon.awssdk</groupId>
157-
<artifactId>cloudwatch-metric-publisher</artifactId>
158-
<version>${awsjavasdk.version}</version>
159-
<scope>compile</scope>
160-
</dependency>
16192
</dependencies>
16293

16394
<dependencyManagement>
@@ -169,13 +100,6 @@
169100
<type>pom</type>
170101
<scope>import</scope>
171102
</dependency>
172-
<dependency>
173-
<groupId>org.eclipse.jetty</groupId>
174-
<artifactId>jetty-bom</artifactId>
175-
<version>${jetty.version}</version>
176-
<type>pom</type>
177-
<scope>import</scope>
178-
</dependency>
179103
</dependencies>
180104
</dependencyManagement>
181105

@@ -198,12 +122,6 @@
198122
<release>${javac.target}</release>
199123
<target>${javac.target}</target>
200124
</configuration>
201-
<executions>
202-
<execution>
203-
<id>compile</id>
204-
<phase>none</phase>
205-
</execution>
206-
</executions>
207125
<inherited>false</inherited>
208126
</plugin>
209127
<plugin>
@@ -274,8 +192,6 @@
274192
<Main-Class>org.openjdk.jmh.Main</Main-Class>
275193
</manifestEntries>
276194
</transformer>
277-
<!-- This is important to run h2 server -->
278-
<!-- https://github.com/jetty-project/embedded-jetty-live-war/blob/master/theserver/pom.xml -->
279195
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
280196
</transformers>
281197
<filters>

test/http-client-benchmarks/src/main/java/software/amazon/awssdk/benchmark/UnifiedBenchmarkRunner.java

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -188,55 +188,6 @@ private static void printComparisonReport(List<BenchmarkResult> results) {
188188
}
189189
}
190190

191-
// Print performance improvements (only if we have matching benchmarks)
192-
printPerformanceImprovements(grouped);
193-
System.out.println("\n" + "=".repeat(80));
194-
}
195-
196-
private static void printPerformanceImprovements(Map<String, Map<String, BenchmarkResult>> grouped) {
197-
System.out.println("\n" + "=".repeat(80));
198-
System.out.println("PERFORMANCE IMPROVEMENTS");
199-
System.out.println("=".repeat(80));
200-
201-
Map<String, BenchmarkResult> apache4 = grouped.get("Apache4");
202-
Map<String, BenchmarkResult> apache5Platform = grouped.get("Apache5-Platform");
203-
Map<String, BenchmarkResult> apache5Virtual = grouped.get("Apache5-Virtual");
204-
205-
if (apache4 != null && apache5Platform != null) {
206-
System.out.println("\nApache5 (Platform) vs Apache4:");
207-
printImprovements(apache4, apache5Platform);
208-
}
209-
210-
if (apache5Platform != null && apache5Virtual != null) {
211-
System.out.println("\nApache5 (Virtual) vs Apache5 (Platform):");
212-
printImprovements(apache5Platform, apache5Virtual);
213-
}
214-
215-
if (apache4 != null && apache5Virtual != null) {
216-
System.out.println("\nApache5 (Virtual) vs Apache4:");
217-
printImprovements(apache4, apache5Virtual);
218-
}
219191
}
220192

221-
private static void printImprovements(Map<String, BenchmarkResult> baseline,
222-
Map<String, BenchmarkResult> comparison) {
223-
// Find common benchmark names
224-
Set<String> commonBenchmarks = new HashSet<>(baseline.keySet());
225-
commonBenchmarks.retainAll(comparison.keySet());
226-
227-
if (commonBenchmarks.isEmpty()) {
228-
System.out.println(" No common benchmarks found for comparison");
229-
return;
230-
}
231-
232-
for (String benchmarkName : commonBenchmarks) {
233-
BenchmarkResult baseResult = baseline.get(benchmarkName);
234-
BenchmarkResult compResult = comparison.get(benchmarkName);
235-
236-
if (baseResult != null && compResult != null) {
237-
double improvement = (compResult.getThroughput() / baseResult.getThroughput() - 1) * 100;
238-
System.out.printf(" %-20s: %+.1f%%%n", benchmarkName, improvement);
239-
}
240-
}
241-
}
242193
}

0 commit comments

Comments
 (0)