gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitcb78a1a0cb78a1a0HM65 report missing heap diagnostic package with repromrecb78a1a0/tests/realdata-060-backfill.sh

1.8 KB

  1. #!/bin/bash
  2. # tests/realdata-060-backfill.sh — mission 060 (tracker#27), NOT the gate: starts the app on the COPY in .scratch/realdata (:8730,
  3. # no TMDB sync, no adult backfill) and times 4 pages with curl, back to back, until the short-id backfill says done (or MAX s).
  4. # The server keeps running (its pid in $OUT/real.pid) — stop it yourself. STATUS.md mission 060 has the whole procedure.
  5. # tests/realdata-060-backfill.sh <run name> [MAX seconds, 500] [full = time until MAX even when done] [VAR=value …]
  6. # → $OUT/real-<run>.log (the app's log), $OUT/times-<run>.txt (path seconds), a summary per page (avg, max, answers over 1 s)
  7. cd "$(dirname "$0")/.."
  8. N=$1; MAX=${2:-500}; FULL=$3; shift 3
  9. OUT=${OUT:-/tmp/w060}
  10. RP=${REAL_PORT:-8730} # the app's port
  11. mkdir -p .scratch/realdata-sessions "$OUT"
  12. env TRACKER_PORT=$RP TRACKER_SYNC=0 TRACKER_WATCH=0 TRACKER_BACKFILL=0 TRACKER_STORAGE=$PWD/.scratch/realdata/storage/mpackdb TRACKER_SESSIONS=$PWD/.scratch/realdata-sessions/ TRACKER_URL=http://127.0.0.1:$RP HL_HOST=127.0.0.1 "$@" setsid nohup ./bin/hybriel project.hl > "$OUT/real-$N.log" 2>&1 < /dev/null & echo $! > "$OUT/real.pid"
  13. for i in $(seq 1 400); do curl -s -o /dev/null http://127.0.0.1:$RP/ && break; sleep 0.05; done
  14. : > "$OUT/times-$N.txt"
  15. END=$(( $(date +%s) + MAX ))
  16. while { [ -n "$FULL" ] || ! grep -q "short ids done\|short ids: nothing\|backfill off" "$OUT/real-$N.log"; } && [ $(date +%s) -lt $END ]; do
  17. for p in /shows/Foundation / /person/Jared-Harris /movies; do
  18. echo "$p $(curl -s -m 20 -o /dev/null -w '%{time_total}' http://127.0.0.1:$RP$p)" >> "$OUT/times-$N.txt"
  19. done
  20. kill -0 $(cat "$OUT/real.pid") 2>/dev/null || { echo DIED; break; }
  21. done
  22. grep -v "^$" "$OUT/real-$N.log" | head -40
  23. awk '{n[$1]++; s[$1]+=$2; if($2>m[$1])m[$1]=$2; if($2>1)o[$1]++} END{for(k in n) printf "%s n=%d avg=%.3f max=%.3f over1s=%d\n",k,n[k],s[k]/n[k],m[k],o[k]}' "$OUT/times-$N.txt"

Branches

Latest commits

  • cb78a1a0HM65 report missing heap diagnostic package with repromre
  • 89606a5cHM65 briefmre
  • 096ce0d4log: DP69 live on day48mre
  • b3d8a80bDP69 brief, RV48 mergedmre
  • ce6d7d32Merge rv48: Hybriel day48mre
  • 3da2ea86RV48: report day48 cold starts, gates and cleanupmre
  • 8d9ecdfeRV48: re-vendor Hybriel set day48 (source b6a8f429, bin 660a9524)mre
  • 4a802ae7status: RV48 runningmre
  • 0a5412b6RV48 brief, day48 outmre
  • 56665efelog: CB69 mergedmre
  • 05448a98Merge cb69-imports: appTitle in a dependency-free topicmre
  • e55b379dKeep shared app title independent of the route import graphmre
  • 9a99659blog: hybriel#334, batch waits for day48mre
  • 85fa6c9blog: CB68 result, CB69 startedmre
  • 2f07c1b7log: DP68 boot gate failed, CB68mre
  • 9652782dlog: HM59 merged, DP68 startedmre
  • 29867a75Merge hm59-logic: tracker#59 page logic moved to libmre
  • f7bfe90bMove remaining page builders into their topicsmre
  • 7c3991f9log: day46 from Antonmre
  • ec54fc35Move show page logic into the shows topicmre