Add graalvm-native-images: Boot 4.1 + GraalVM CE for JDK 25, AOT processing,
the tracing agent, and a real reflection-collision trap Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01EQNA6DJ9VgCtW6zhCE8Xud
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
# Reproduces every measurement behind the ankurm.com GraalVM native images post.
|
||||
# Requires: JAVA_HOME pointed at a plain JDK 25 for the JVM steps, and a separate GraalVM
|
||||
# distribution (with the bundled native-image tool) for the native steps -- see docs/00-versions.md.
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
echo "== 1. plain JVM baseline =="
|
||||
"$JDK25_HOME/bin/java" -jar target/app.jar --server.port=8081 &
|
||||
JPID=$!
|
||||
sleep 5
|
||||
curl -s localhost:8081/hello; echo
|
||||
ps -o rss= -p $JPID
|
||||
kill $JPID
|
||||
|
||||
echo "== 2. build the native image (mvn -Pnative native:compile) =="
|
||||
mvn -Pnative -DskipTests native:compile
|
||||
|
||||
echo "== 3. run the native image, reflection trap included =="
|
||||
./target/graalvm-native-images --server.port=8082 &
|
||||
NPID=$!
|
||||
sleep 1
|
||||
curl -s "localhost:8082/report?format=plain"; echo
|
||||
ps -o rss= -p $NPID
|
||||
kill $NPID
|
||||
Reference in New Issue
Block a user