otel: funky dashboard (latency bar chart + status-colored waterfall) + boot self-warm
Dashboard gains a per-route latency bar chart (nested p50/p95/p99 bars, tail visible) + status-colored waterfall with ms duration labels + a real 3s auto-refresh (replacing the non-functional data-on-load SSE attr). serve.sh self-warms the serving JIT over /dev/tcp so the first visitor after a restart gets ~78ms not the one-time ~2.5s compile. otel suite 125/125.
This commit is contained in:
@@ -28,6 +28,27 @@ fi
|
||||
|
||||
PORT="${HOST_PORT:-8910}"
|
||||
|
||||
# Self-warm the SERVING JIT. The FIRST HTTP request after a restart pays a one-time
|
||||
# ~2.5s cost: the shared request path (session middleware + router + instrumented
|
||||
# handlers + blog render) JIT-compiles under the http-listen resolver, a context a
|
||||
# boot-time render can't reach. So once the server is answering, we GET the hot
|
||||
# pages ONCE over real HTTP to absorb that compile before a visitor does (~2.5s ->
|
||||
# ~78ms warm). The container image has no curl/wget, so we speak HTTP over bash's
|
||||
# /dev/tcp. Runs detached (survives the exec below); exits after warming.
|
||||
_warm_serving_jit() {
|
||||
local path
|
||||
for _ in $(seq 1 180); do
|
||||
case "$( { exec 3<>/dev/tcp/127.0.0.1/"$PORT" && printf 'GET /health HTTP/1.0\r\nHost: x\r\n\r\n' >&3 && head -1 <&3; exec 3>&- 3<&-; } 2>/dev/null )" in
|
||||
*200*) break ;;
|
||||
esac
|
||||
sleep 0.5
|
||||
done
|
||||
for path in / /welcome /nt-live-encore /otel; do
|
||||
{ exec 3<>/dev/tcp/127.0.0.1/"$PORT" && printf 'GET %s HTTP/1.0\r\nHost: x\r\n\r\n' "$path" >&3 && cat <&3 >/dev/null; exec 3>&- 3<&-; } 2>/dev/null
|
||||
done
|
||||
}
|
||||
_warm_serving_jit &
|
||||
|
||||
# Modules: every load line from conformance.sh's MODULES list, minus the ledger
|
||||
# (not needed to serve). server.sx supplies host/serve.
|
||||
MODULES=(
|
||||
|
||||
Reference in New Issue
Block a user