A Spring Boot 4.1.1 order service started 12 ways (plain and extracted jar, Spring AOT output, AppCDS, AOT cache trained with and without traffic, JDK 27, native image), ten interleaved rounds each, with first-request latency; 24 cache-mismatch cases; Docker layer arithmetic. Transcripts are in output/ (no docs/ folder). Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TF9JWFvJSNm6HVzswzZU5a
12 lines
786 B
Bash
Executable File
12 lines
786 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Builds the GraalVM native image of the same service (no reflection tricks: the app has none). Takes minutes.
|
|
source "$(dirname "$0")/env.sh"
|
|
cd "$ROOT"; mkdir -p "$WORK"
|
|
t0=$(date +%s)
|
|
JAVA_HOME=$GRAALVM mvn_run mvn -B -DskipTests -Pnative native:compile > "$WORK/native-build.log" 2>&1
|
|
rc=$?
|
|
echo "# GraalVM: $("$GRAALVM/bin/native-image" --version 2>&1 | head -1)"
|
|
grep -E "types, .* fields, and .* methods found reachable|Peak RSS|Finished generating|BUILD (SUCCESS|FAILURE)|Total time" "$WORK/native-build.log" | sed -E 's/^\[INFO\] //; s/^ +//'
|
|
[ $rc -eq 0 ] && cp "target/aot-cache" "$WORK/aot-cache-native" && ls -l "$WORK/aot-cache-native" "$WORK/app.jar" | awk '{printf "%-30s %d MB\n", $NF, $5/1048576}'
|
|
echo "build wall time: $(( $(date +%s) - t0 )) s"
|