#!/usr/bin/env bash # Campaign VM slice VM0 production perf probe: connected, uncapped Release, NO automation # artifact dir (so no render-scene observer), reads the client's own [frame-prof] lines. # usage: perf-run.sh [slash-command] set -u name=$1; exe=$2; cfg=$3; out=$4; cmd=${5:-} mkdir -p "$out/$name"; log="$out/$name/client.log"; probe="$out/$name/probe.txt" sc="$out/$name/session.json" cat > "$sc" < "$probe" ACDREAM_DAT_DIR="$USERPROFILE/Documents/Asheron's Call" ACDREAM_CONFIG_DIR="$cfg" ACDREAM_DATA_DIR="$out/$name/data" ACDREAM_CACHE_DIR="$out/$name/cache" \ ACDREAM_NO_AUDIO=1 ACDREAM_DAY_GROUP=0 ACDREAM_WORLD_TIME=0.5 ACDREAM_SKY_PHASE_SECONDS=0 ACDREAM_MSAA_SAMPLES=0 ACDREAM_UNCAPPED_RENDER=1 ACDREAM_FRAME_PROF=1 \ ACDREAM_UI_PROBE_SCRIPT="$probe" "$exe" --session-config "$sc" > "$log" 2>&1 & pid=$! # wait for the probe to finish (75 s after arrival), then graceful close for i in $(seq 1 200); do grep -q "UI probe script complete" "$log" 2>/dev/null && break; sleep 1; done pwsh -NoProfile -Command '$p=Get-Process -Name AcDream.App -ErrorAction SilentlyContinue; if($p){$p.CloseMainWindow()|Out-Null; if(-not $p.WaitForExit(10000)){$p|Stop-Process -Force}}' >/dev/null wait $pid 2>/dev/null echo "== $name"; tr -d '\r' < "$log" | grep "frame-prof" | tail -8 | sed 's/^.*\[frame-prof\]/ /' | cut -c1-150