gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit451db7cd451db7cdgc1: show page and check clicks read the kept watched set instead of building one from a by-value copy of every watchmre451db7cd/tests/realdata-071.sh

2.4 KB

  1. #!/bin/bash
  2. # realdata-071.sh <jobs|fresh|stop> <new|old> <port> — mission 071 (Hybriel re-vendor, old 8590df63 vs new), NOT the gate.
  3. # Works on .scratch/w071/real-<which>/ (a COPY of live storage/, see STATUS "How to repeat"); old runs from .scratch/w071/oldtree
  4. # (this tree with .scratch/pre-070 bin/plugins and a .env link).
  5. # jobs: all jobs on, the daily run forced NOW as a delta (sync-state.txt = yesterday) → server-jobs.log, rss-jobs.log
  6. # fresh: a process on the done copy, TRACKER_SYNC=0 → server-fresh.log, rss-fresh.log; prints the boot RSS 60 s after listening
  7. # stop: kills the server by its PID (server.pid)
  8. # Both start modes write a session for the creator (az5b2 = user 0mujqspn0aqb) → real-<which>/sid.
  9. W=/media/STORAGE/projects/WorldAPI/tracker.worldapi.org; mode=$1; which=$2; port=$3
  10. R=$W/.scratch/w071/real-$which; tree=$W; [ "$which" = old ] && tree=$W/.scratch/w071/oldtree
  11. if [ "$mode" = stop ]; then pid=$(cat $R/server.pid); kill $pid; while kill -0 $pid 2>/dev/null; do sleep 1; done; echo "stopped $pid"; exit 0; fi
  12. mkdir -p $R/sessions
  13. sid=$(head -c 16 /dev/urandom | xxd -p); now=$(date +%s%3N)
  14. echo "{\"created\":$now,\"data\":{\"tag\":\"t\"},\"id\":\"$sid\",\"seen\":$now,\"user\":{\"id\":\"0mujqspn0aqb\"}}" > $R/sessions/$(printf %s "$sid" | sha256sum | cut -d' ' -f1)
  15. echo $sid > $R/sid
  16. cd $tree
  17. if [ "$mode" = jobs ]; then
  18. date -u -d yesterday +%F > $R/storage/mpackdb/sync-state.txt
  19. set -- TRACKER_SYNC=1 TRACKER_SYNC_HOUR=$(date -u +%-H)
  20. else
  21. set -- TRACKER_SYNC=0
  22. fi
  23. env "$@" TRACKER_PORT=$port TRACKER_URL=http://127.0.0.1:$port HL_HOST=127.0.0.1 TRACKER_WATCH=0 \
  24. TRACKER_STORAGE=$R/storage/mpackdb TRACKER_SESSIONS=$R/sessions/ TRACKER_OLD_SHORT_IDS=$tree/data/old-short-ids.json \
  25. setsid ./bin/hybriel project.hl > $R/server-$mode.log 2>&1 < /dev/null &
  26. pid=$!; echo $pid > $R/server.pid
  27. # RSS every 10 s ("<s since start> <time> <kB>") until the process ends
  28. ( t0=$(date +%s); while kill -0 $pid 2>/dev/null; do echo "$(( $(date +%s) - t0 )) $(date +%T) $(awk '/VmRSS/{print $2}' /proc/$pid/status 2>/dev/null)" >> $R/rss-$mode.log; sleep 10; done ) > /dev/null 2>&1 < /dev/null &
  29. t0=$(date +%s)
  30. until curl -s -o /dev/null http://127.0.0.1:$port/; do sleep 1; kill -0 $pid 2>/dev/null || { echo "server died"; tail -20 $R/server-$mode.log; exit 1; }; done
  31. echo "$which $mode pid $pid listening after $(( $(date +%s) - t0 )) s"
  32. if [ "$mode" = fresh ]; then sleep 60; echo "boot RSS (60 s after listening): $(awk '/VmRSS/{printf "%.0f", $2/1024}' /proc/$pid/status) MB"; fi

Branches

Latest commits

  • 451db7cdgc1: show page and check clicks read the kept watched set instead of building one from a by-value copy of every watchmre
  • ddb4127egc1: TRACKER_QSTATS=1 logs queue and cache sizes every 10 s (measurement only)mre
  • da60547fstatus: GC1 done, backup bugmre
  • e4171021log: GC1 result, backup hard-link bugmre
  • f1597214deploy.sh backup: tar --hard-dereference (hot tar stored mpackdb sidecars as hard links to .sessions files)mre
  • 6b58571elog: GC windowmre
  • 5c8baa1fdeploy lock: hold only around deploy.shmre
  • b8dac822log: hybriel#309mre
  • bf676d9elog: GC1 startedmre
  • c7828541mission GC1mre
  • ef949994conductor: neutral ticket rulemre
  • 89e91ef3log: RV39 livemre
  • ee2b677alog: RV39 deployingmre
  • c1c4178cMerge branch 'rv39'mre
  • a016e9abReapply "Merge branch 'rv39'"mre
  • f29e2502log: RV39 gate fixmre
  • d9fce111browser gate #26: exact frame count incl. SL1 people step (hybriel#308)mre
  • ad529ac1log: m572 verdictmre
  • 1b37d404RV39 on hold: hybriel#308mre
  • f9127c68Revert "Merge branch 'rv39'"mre