gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commita31c8f2fa31c8f2fdocs: tracker#36 remaining listmrea31c8f2f/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

  • a31c8f2fdocs: tracker#36 remaining listmre
  • 975d06d1log: #36 live, DP66 startedmre
  • d6d03fa3mission: T36Bmre
  • e7512d00status: #36 rolled back, retry askedmre
  • c98e2043log: T36A rollbackmre
  • ae905f15Merge t36a: tracker#36 apply rechecks, reportmre
  • 796bfaceT36A: report validated fixes, failed live SSH check and verified rollbackmre
  • 55257852log: #53 live, #56 mergedmre
  • 78b39f1bMerge hm56-rows: tracker#56 list builders insert oncemre
  • 7aea52batmdb fix: protect owners without slugs and record passing gatesmre
  • 9b3c2559tmdb fix: revalidate planned identities and reserve target idsmre
  • 6da612fclog: T36A tool defectmre
  • d56ee0daT36A: report unsafe TMDB apply revalidation and stop before livemre
  • 08e55255log: HM56 done, T36A startedmre
  • 91bcdf0eAvoid per-row list copies and reproduce keyed-row blockersmre
  • 5fd2ac75status: #36 GOmre
  • 0d253b45mission: T36Amre
  • 2aa22d23log: #36 GOmre
  • 833aee2flog: #50 closed, HM56 startedmre
  • ac58c1e5mission: HM56mre