Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/interplane-forge/blob/main/server/tests/trial-real.sh # interplane-forge INTERPLANE Forge Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `interplane-forge / server / tests / trial-real.sh` 41 lines ยท 3212 bytes Raw Blame History 1 #!/usr/bin/env bash 2 # server/tests/trial-real.sh: the counts and the JSON form on REAL data, before a deploy. 3 # bash server/tests/trial-real.sh (spark; FORGED_CPUS default 12-14; FORGE_TEST_PORT default 18487) 4 # Builds this tree with only the port and the data dir moved (a temp dir holding a copy of 5 # ~/forge-data/logs/forged.log), so it reads the real front-door nginx logs, the real routing table 6 # (rad) and getent, read-only, and writes its journal into the temp dir. Then: infra/smoke.sh local 7 # against it under both bases, the repo-home time of the first read (whole logs) and of the next 8 # read, and the forge/repo/1 counts of every public repo. Never touches 18480 or ~/forge-data. 9 set -euo pipefail 10 cd "$(dirname "$0")/../.." 11 CORES=${FORGED_CPUS:-12-14} 12 PORT=${FORGE_TEST_PORT:-18487} 13 OMC=$HOME/work/flux/omega-mv/seed/out/omc 14 T=$(mktemp -d) 15 pid= 16 trap '[ -n "$pid" ] && kill "$pid" 2>/dev/null; wait 2>/dev/null; [ -n "${KEEP:-}" ] || rm -rf "$T"' EXIT 17 mkdir -p "$T/data/logs" 18 cp "$HOME/forge-data/logs/forged.log" "$T/data/logs/forged.log" 19 { printf 'om2\n'; cat $(./run.sh units); } | sed -e "s|^text tfdata \".*\"|text tfdata \"$T/data/\"|" -e "s/18480/$PORT/g" > "$T/all.om" 20 taskset -c "$CORES" nice -n 10 "$OMC" < "$T/all.om" > "$T/forged" || { echo "BUILD FAILED"; exit 1; } 21 chmod 755 "$T/forged" 22 echo "trial build $(sha256sum < "$T/forged" | cut -d' ' -f1)" 23 taskset -c "$CORES" nice -n 10 "$T/forged" 2> "$T/err" & pid=$! 24 for i in $(seq 100); do curl -s -o /dev/null "http://127.0.0.1:$PORT/explore" && break; sleep 0.1; done 25 t() { curl -s -o "$T/b" -w '%{time_total}' -H "X-Forge-Base: /" "http://127.0.0.1:$PORT/$1"; } 26 echo "repo home, first read of the logs: $(t drakestapleton/cuda-crack) s" 27 echo "repo home, next read: $(t drakestapleton/cuda-crack) s" 28 echo "repo home JSON: $(t drakestapleton/cuda-crack.json) s" 29 echo "explore JSON: $(t explore.json) s" 30 t drakestapleton/cuda-crack > /dev/null; grep '