#!/usr/bin/env bash # #52 FINAL gimp-replication check (clean-room script -- the sed-derived # chain dropped envs). A: walks + aimed leg self-damage -> ~22s of REAL # gimped walking before the leg dies. B: observer with the replicant probes # ([replgimp] 1 Hz: the peer's view of the gimp level) + [skate] + captures. # QUESTION: does the PEER limp while the master limps (gl=3 on B)? set -x . /c/git/bt411/scratchpad/night6/bench_common.sh cd /c/git/bt411/content || exit 1 taskkill //F //IM btl4.exe > /dev/null 2>&1 sleep 2 rm -f sg5_a.log sg5_b.log sg5B_*.png bt_novice_egg MP.EGG SG5.EGG sed -i "s/^map=.*/map=grass/; s/^time=.*/time=day/; s/^vehicle=.*/vehicle=madcat/" SG5.EGG ( export BT_AUTODRIVE=0.5 BT_SELF_DAMAGE=4 BT_SELF_DAMAGE_ZONE=dz_ldleg export BT_DMG_LOG=1 BT_DEATH_LOG=1 BT_MP_LOG=1 BT_MATCHLOG=1 bt_launch sg5_a.log SG5.EGG 0x0C -net 1601 ) sleep 2 ( export BT_REPL_LOG=1 BT_JIT=1 BT_SHOT_EVERY=90 BT_SHOT_PREFIX=sg5B export BT_DEATH_LOG=1 BT_MP_LOG=1 BT_MATCHLOG=1 bt_launch sg5_b.log SG5.EGG 0x03 -net 1501 ) sleep 5 python ../tools/btconsole.py SG5.EGG 127.0.0.1:1501 127.0.0.1:1601 > sg5_relay.log 2>&1 & RELAY=$! sleep 200 kill $RELAY 2>/dev/null taskkill //F //IM btl4.exe > /dev/null 2>&1 sleep 3 echo "=== A gimp window (master):" grep -a "gaitSM" sg5_a.log | grep -oaE "state=[0-9]+" | sort | uniq -c echo "=== B peer gimp view (replgimp gl values):" grep -a "replgimp" sg5_b.log | grep -oaE "gl=[0-9]+" | sort | uniq -c grep -a "replgimp" sg5_b.log | grep -v "gl=0" | head -6 echo "=== SKATE:" grep -ac "\[skate\]" sg5_b.log