forked from mtusi2026/mtusi2026lab4
Carry source f591fa64e525679a31c9db7f942d36c789e1a12f forward from 72a1e57. Preserve lab4 attachment transactions, reconciliation locks, quarantine, and existing schema data through verified legacy adoption. Keep report and evidence work in progress untouched.
12 lines
343 B
Bash
Executable File
12 lines
343 B
Bash
Executable File
#!/bin/sh
|
|
set -eu
|
|
out=${1:?usage: lb-stats.sh <csv>}
|
|
cd "$(dirname "$0")/.."
|
|
url=${LB_STATS_URL:-http://$(docker compose port lb 8404)/stats;csv}
|
|
curl -fsS "$url" | sed -n '1s/^# /ts,/p' > "$out"
|
|
while :; do
|
|
ts=$(date +%s)
|
|
curl -fsS "$url" | grep -E '^(public|api),' | sed "s/^/$ts,/" >> "$out" || true
|
|
sleep "${INTERVAL:-1}"
|
|
done
|