From f4b34c458da2bdb106dbbc39358e226e5606bf08 Mon Sep 17 00:00:00 2001 From: monosans Date: Thu, 30 Apr 2026 17:53:18 +0300 Subject: [PATCH] fix: improve page fault tracking in Run-One function --- .github/scripts/allocator_bench_windows.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/scripts/allocator_bench_windows.ps1 b/.github/scripts/allocator_bench_windows.ps1 index 0eb3ed7..9f1da6c 100644 --- a/.github/scripts/allocator_bench_windows.ps1 +++ b/.github/scripts/allocator_bench_windows.ps1 @@ -29,7 +29,9 @@ function Run-One([string]$allocator, [string]$features) { $p = Get-Process -Id $proc.Id -ErrorAction Stop $current = [math]::Max($p.WorkingSet64, $p.PeakWorkingSet64) if ($current -gt $peak) { $peak = $current } - if ($p.PageFaults -gt $faults) { $faults = $p.PageFaults } + + $wmi = Get-CimInstance Win32_Process -Filter "ProcessId=$($proc.Id)" -ErrorAction SilentlyContinue + if ($wmi -and $wmi.PageFaults -gt $faults) { $faults = $wmi.PageFaults } } catch { } }