Add jdk28-zgc: ZGC startup and warmup baseline on JDK 25/27/28-ea, and a probe for JEP 545/546

Spring Boot 4.1.1 harness measuring first-response time versus initial heap size and a
20,000-request warmup. Shows -XX:+ZAdaptiveHeapSizing is not yet in any build.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WzVQ6zFh9cuLPj9RSbRH8U
This commit is contained in:
2026-10-12 17:13:14 +00:00
co-authored by Claude Sonnet 5.5
parent 2f88734f5d
commit df13a904d7
11 changed files with 431 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
import java.net.URI;
import java.net.http.*;
import java.util.*;
import java.util.concurrent.*;
import java.util.concurrent.atomic.*;
/** Fires TOTAL requests with THREADS threads and reports how long each batch of BATCH took. */
public class Warmup {
public static void main(String[] a) throws Exception {
int port = Integer.parseInt(a[0]);
int total = 20_000, batch = 2_000, threads = 4;
HttpClient c = HttpClient.newBuilder().version(HttpClient.Version.HTTP_1_1).build();
HttpRequest rq = HttpRequest.newBuilder(URI.create("http://localhost:" + port + "/hello")).build();
AtomicInteger done = new AtomicInteger();
long[] batchEnd = new long[total / batch];
long t0 = System.nanoTime();
ExecutorService ex = Executors.newFixedThreadPool(threads);
List<Future<?>> fs = new ArrayList<>();
for (int t = 0; t < threads; t++) fs.add(ex.submit(() -> {
try {
while (true) {
int n = done.incrementAndGet();
if (n > total) return null;
c.send(rq, HttpResponse.BodyHandlers.discarding());
if (n % batch == 0) batchEnd[n / batch - 1] = System.nanoTime();
}
} catch (Exception e) { throw new RuntimeException(e); }
}));
for (Future<?> f : fs) f.get();
ex.shutdown();
StringBuilder sb = new StringBuilder("batch ms:");
long prev = t0;
for (long e : batchEnd) { sb.append(' ').append((e - prev) / 1_000_000); prev = e; }
System.out.println(sb);
System.out.println("total ms: " + (prev - t0) / 1_000_000);
}
}