Takeover after the PC reset. Verified at 1 and 8 workers: density, geometry, full payload and topology hashes equal for all nine outputs; routes 5642/5642; crater transaction 17 ms; player neighbourhood mesh-ready 23 ms after streaming starts. - The plugin's materials consume UV, the packed biome/slope/blend colours and the ceiling/ground sections, so the viewer-only skips stay off by default (diagnostic only: 1.53 s without them). - UVs staged as FVector2f (matches the game stream; -20 MB, no speed change). Far-bin reserve 24x. - LOD6 is the long pole: 32.7 M density samples, 1.83 M vertices, ~1.1 s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MmSoF64BbRFmk9C3p1VsBJ
41 lines
2.0 KiB
PowerShell
41 lines
2.0 KiB
PowerShell
[CmdletBinding()]
|
|
param(
|
|
[Parameter(Mandatory=$true)][string]$ExecutableName,
|
|
[Parameter(Mandatory=$true)][string[]]$ExecutableArguments,
|
|
[Parameter(Mandatory=$true)][string]$LogStem
|
|
)
|
|
|
|
$ErrorActionPreference = 'Stop'
|
|
$RoundDir = [IO.Path]::GetFullPath($PSScriptRoot)
|
|
$StandaloneRoot = [IO.Path]::GetFullPath((Join-Path $PSScriptRoot '..\..\..'))
|
|
if ([IO.Path]::GetFileName($ExecutableName) -ne $ExecutableName) { throw 'ExecutableName must be a filename.' }
|
|
if ([IO.Path]::GetFileName($LogStem) -ne $LogStem) { throw 'LogStem must be a filename stem.' }
|
|
$ExecutablePath = Join-Path (Join-Path $StandaloneRoot 'bin') $ExecutableName
|
|
if (-not (Test-Path -LiteralPath $ExecutablePath -PathType Leaf)) { throw "Executable not found: $ExecutablePath" }
|
|
$StdoutPath = Join-Path $RoundDir ($LogStem + '.stdout.log')
|
|
$StderrPath = Join-Path $RoundDir ($LogStem + '.stderr.log')
|
|
|
|
$HostProcess = Get-Process -Id $PID
|
|
$HostProcess.PriorityClass = 'BelowNormal'
|
|
$HostProcess.ProcessorAffinity = [IntPtr]0xFF00
|
|
$RunClock = [Diagnostics.Stopwatch]::StartNew()
|
|
$Child = Start-Process -FilePath $ExecutablePath -ArgumentList $ExecutableArguments `
|
|
-WorkingDirectory $StandaloneRoot -WindowStyle Hidden -PassThru `
|
|
-RedirectStandardOutput $StdoutPath -RedirectStandardError $StderrPath
|
|
$PeakWorkingSet = 0L
|
|
$PeakPrivateMemory = 0L
|
|
while (-not $Child.HasExited) {
|
|
$Child.Refresh()
|
|
if ($Child.HasExited) { break }
|
|
$Child.PriorityClass = 'BelowNormal'
|
|
$Child.ProcessorAffinity = [IntPtr]0xFF00
|
|
$PeakWorkingSet = [Math]::Max($PeakWorkingSet,$Child.WorkingSet64)
|
|
$PeakPrivateMemory = [Math]::Max($PeakPrivateMemory,$Child.PrivateMemorySize64)
|
|
Start-Sleep -Milliseconds 50
|
|
}
|
|
$Child.WaitForExit()
|
|
$RunClock.Stop()
|
|
$Child.Refresh()
|
|
Write-Output "RUN_EXIT pid=$($Child.Id) priority=BelowNormal affinity=0xFF00 wall_s=$([math]::Round($RunClock.Elapsed.TotalSeconds,3)) peak_working_set_gb=$([math]::Round($PeakWorkingSet/1GB,2)) peak_private_gb=$([math]::Round($PeakPrivateMemory/1GB,2)) cpu_s=$([math]::Round($Child.CPU,3)) exit_code=$($Child.ExitCode)"
|
|
exit $Child.ExitCode
|