Adds spring-boot-startup-time/, the companion project for BLOG-618: a runnable Spring Boot 4.1.1 application on JDK 25 that installs BufferingApplicationStartup and FlightRecorderApplicationStartup behind a system property, and a /diag/startup endpoint that computes step self time -- the number /actuator/startup does not give you and the one that names the actual culprits. Captured under docs/output/: the step tree sorted both ways, the same startup as JFR events, a +5000-class experiment putting 0.11 ms per scanned class on the classpath scan tax, the silent truncation a 2048-step buffer performs, and JDK 25 AOT cache timings (6.93 s to 4.82 s). Post body and metadata live in post/. Moves the existing Actuator project into actuator-in-production/ so the repository holds one directory per article; the root README is now an index.
15 lines
675 B
Bash
Executable File
15 lines
675 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Kill by main class, never by a pattern that could match this script's own command line.
|
|
# `pkill -f spring-boot` matches the shell running it and takes the terminal with it.
|
|
set -u
|
|
for p in $(ps -eo pid,args | grep '[A]ctuatorProductionApplication' | awk '{print $1}'); do
|
|
kill -9 "$p" 2>/dev/null || true
|
|
done
|
|
# Wait for the port to actually close. Killing the PID is not the same as the socket being
|
|
# free, and a stale listener looks exactly like your configuration change having no effect.
|
|
for _ in $(seq 1 40); do
|
|
if ! (exec 3<>/dev/tcp/127.0.0.1/"${APP_PORT:-8080}") 2>/dev/null; then break; fi
|
|
sleep 0.25
|
|
done
|
|
exec 3<&- 2>/dev/null || true
|