Live heap, throughput, p99 and startup across four configurations, including opt-in and opt-out of compact object headers. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WzVQ6zFh9cuLPj9RSbRH8U
16 lines
789 B
Bash
Executable File
16 lines
789 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Usage: live-set.sh <java-home> <label> [jvm args...]
|
|
# Starts the server, forces a full GC through /live, and prints the heap still in use.
|
|
# This is the resident data set: 3,000,000 two-int records plus the Spring Boot baseline.
|
|
set -u
|
|
JH=$1; LABEL=$2; shift 2
|
|
JAR="$(dirname "$0")/../target/jdk27-perf-1.0.0.jar"
|
|
PORT=${PORT:-18082}
|
|
"$JH/bin/java" "$@" -jar "$JAR" --server.port=$PORT --spring.main.banner-mode=off \
|
|
--logging.level.root=WARN > /dev/null 2>&1 &
|
|
PID=$!
|
|
until [ "$(curl -s -o /dev/null -m 2 -w '%{http_code}' "localhost:$PORT/stats")" = 200 ]; do sleep 0.05; done
|
|
live=$(curl -s "localhost:$PORT/live" | sed -n 's/.*"liveHeapMiB":\([0-9]*\).*/\1/p')
|
|
echo "$LABEL: live heap after full GC ${live} MiB"
|
|
kill $PID 2>/dev/null; wait $PID 2>/dev/null
|