From d714fc1ac44f6b2baec0cc76390b6ebed5a21feb Mon Sep 17 00:00:00 2001 From: sanchaton <138723000+sanchaton@users.noreply.github.com> Date: Fri, 27 Nov 2026 03:39:21 +0100 Subject: [PATCH] fix(scripts): measure-run.ps1 reads frame lines under Windows PowerShell 5.1 --- docs/fork-notes.md | 6 ++++++ scripts/measure-run.ps1 | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/fork-notes.md b/docs/fork-notes.md index 541ce7ade..0c836f1ec 100644 --- a/docs/fork-notes.md +++ b/docs/fork-notes.md @@ -5,6 +5,12 @@ The status summary is in [README.md](../README.md). ## Newest (2026-11-26) +**`scripts/measure-run.ps1` reads frame lines under Windows PowerShell 5.1.** +The colour codes of `stderr.log` were stripped with the `` `e `` escape, +which only PowerShell 7 knows; under 5.1 no frame line matched and +`summary.txt` gave `lines: 0` and `NaN` for every figure. The escape is now +`[char]27`, the same under both. + **R-7: a sampler chosen by control flow between immediate samplers.** 40 programs (cascade shadows, terrain, `PS_TexturedLit*`, `PS_TexturedDeferred`, `PS_PuddleDetect`...) failed with a descriptor diff --git a/scripts/measure-run.ps1 b/scripts/measure-run.ps1 index 54e5bac3e..a3c95dac2 100644 --- a/scripts/measure-run.ps1 +++ b/scripts/measure-run.ps1 @@ -86,7 +86,7 @@ $since = $start.AddSeconds($From) $fps = @(); $ms = @(); $gpu = @(); $prep = @(); $back = @(); $draws = @(); $usual = @(); $median = @() $world = $null; $bad = @() foreach ($raw in [System.IO.File]::ReadLines((Join-Path $run 'stderr.log'))) { - $line = $raw -replace "`e\[[0-9;]*m", '' + $line = $raw -replace "$([char]27)\[[0-9;]*m", '' if ($line -notmatch '^(\d{4}-\d\d-\d\dT[\d:.]+)Z') { continue } $t = [datetime]::Parse($Matches[1], [Globalization.CultureInfo]::InvariantCulture) if ($line -match 'device removed|DEVICE_REMOVED|DEVICE_HUNG|panicked' -or ($line -match 'leonida_gpu::drvwatch' -and $line -notmatch 'are watched')) {