Rig launcher: numbers in one form on every PC, and -Compare reads rows written with a decimal comma #2824

Open
github-bot wants to merge 1 commit from github-bot/gh-2824 into main AGit
Owner

@⁠breachato on GitHub · 2026-11-29 17:45 UTC · original
breachato:rig-scripts-invariant-culture → main · +21 −5 · 2 files · 1 commits · open

[pr-fix]

What it changes

scripts/play-rig.ps1 and scripts/watch-rig.ps1 format numbers with the current culture ('{0:N1}' -f) and, in -Compare, read some of them back with [double], which only takes .. On a Windows set to a language with a decimal comma (Italian, German, French, Spanish, ...):

  • the summary and the live watch print 30,0 fps, 21,9 GB;
  • -Compare builds its table with 30,5 and then computes the A/B verdict from it with [double]'30,5' = 305: three runs at 30 fps against three at 30.5 report room=84 vs room=80: +916.7 % median fps instead of no clear winner;
  • rig-runs.csv rows written on such a PC by Export-Csv hold 30,5, which the same [double] casts misread later.

This:

  1. sets the script thread's culture to InvariantCulture at the start of both scripts (only that thread; the console and the game are not affected);
  2. formats the table's fps columns with F1 instead of N1 (no thousands separator, so the value reads back exactly);
  3. reads rig-runs.csv numbers through a small Get-Number, which accepts 30.5 and also the 30,5 rows already written on decimal-comma PCs (the file's values never have thousands separators).

Both files stay ASCII and CRLF.

How it was tested

  • Windows 11, culture it-IT, Windows PowerShell 5.1, Pester 3.4: Invoke-Pester .\scripts\tests
  • Before: 7 passed, 6 failed (-Summary "median 30.0 fps", both -Compare verdicts, the leftover-process line, watch-rig.ps1's end line, the preload row).
  • After: 12 passed, 1 failed. The one left (records the run with its memory columns) fails because this PC's CPU has one kind of core, so -Try cores picks no variant; unrelated to the culture.
  • No game run needed: scripts only. cargo test: not applicable.

How to try it

On a Windows set to Italian (or German, French...):

  1. Invoke-Pester .\scripts\tests (Pester 3.4 as shipped with Windows): 6 tests fail on main, they pass here.
  2. By hand: write three rows at 30 fps and three at 30.5 into rig-runs.csv (-Try room, or copy the test's Row helper) and run .\scripts\play-rig.ps1 -Compare: main reports +916.7 % median fps, this branch no clear winner.

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related: #2760 also edits play-rig.ps1 and its tests (workstation RTX generations), different lines.

Assisted by Claude.

**@⁠breachato** on GitHub · 2026-11-29 17:45 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2824) `breachato:rig-scripts-invariant-culture` → `main` · +21 −5 · 2 files · 1 commits · open [pr-fix] ## What it changes `scripts/play-rig.ps1` and `scripts/watch-rig.ps1` format numbers with the current culture (`'{0:N1}' -f`) and, in `-Compare`, read some of them back with `[double]`, which only takes `.`. On a Windows set to a language with a decimal comma (Italian, German, French, Spanish, ...): - the summary and the live watch print `30,0 fps`, `21,9 GB`; - `-Compare` builds its table with `30,5` and then computes the A/B verdict from it with `[double]'30,5'` = **305**: three runs at 30 fps against three at 30.5 report `room=84 vs room=80: +916.7 % median fps` instead of `no clear winner`; - `rig-runs.csv` rows written on such a PC by `Export-Csv` hold `30,5`, which the same `[double]` casts misread later. This: 1. sets the script thread's culture to `InvariantCulture` at the start of both scripts (only that thread; the console and the game are not affected); 2. formats the table's fps columns with `F1` instead of `N1` (no thousands separator, so the value reads back exactly); 3. reads `rig-runs.csv` numbers through a small `Get-Number`, which accepts `30.5` and also the `30,5` rows already written on decimal-comma PCs (the file's values never have thousands separators). Both files stay ASCII and CRLF. ## How it was tested - Windows 11, culture `it-IT`, Windows PowerShell 5.1, Pester 3.4: `Invoke-Pester .\scripts\tests` - Before: 7 passed, 6 failed (`-Summary` "median 30.0 fps", both `-Compare` verdicts, the leftover-process line, `watch-rig.ps1`'s end line, the preload row). - After: 12 passed, 1 failed. The one left (`records the run with its memory columns`) fails because this PC's CPU has one kind of core, so `-Try cores` picks no variant; unrelated to the culture. - No game run needed: scripts only. `cargo test`: not applicable. ## How to try it On a Windows set to Italian (or German, French...): 1. `Invoke-Pester .\scripts\tests` (Pester 3.4 as shipped with Windows): 6 tests fail on `main`, they pass here. 2. By hand: write three rows at `30` fps and three at `30.5` into `rig-runs.csv` (`-Try room`, or copy the test's `Row` helper) and run `.\scripts\play-rig.ps1 -Compare`: `main` reports `+916.7 % median fps`, this branch `no clear winner`. ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: #2760 also edits `play-rig.ps1` and its tests (workstation RTX generations), different lines. Assisted by Claude.
play-rig.ps1 and watch-rig.ps1 formatted numbers with the current culture
and read them back with [double], which takes '.' only. On a PC with a
decimal comma (it-IT here) the -Compare table showed 30,5 and read it back
as 305: three runs at 30 fps against three at 30.5 gave '+916.7 % median
fps' instead of 'no clear winner'. Both scripts now set their thread's
culture to InvariantCulture, the table uses F1 (no thousands separator),
and rig-runs.csv values go through Get-Number, which also reads the
'30,5' rows such PCs have already written.

scripts/tests on it-IT: 7 of 13 passed before, 12 of 13 after (the one
left assumes a CPU with fast and slow cores).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 17:50:23 +00:00
github-bot force-pushed github-bot/gh-2824 from 5ab6ed043f to dc343751f2 2026-11-30 18:47:08 +00:00 Compare
github-bot force-pushed github-bot/gh-2824 from dc343751f2 to 51cded371b 2026-12-01 14:00:24 +00:00 Compare
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2824/head:github-bot/gh-2824'
git switch 'github-bot/gh-2824'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2824'
git switch 'github-bot/gh-2824'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2824'
git switch 'github-bot/gh-2824'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2824'
git switch 'main'
git merge --squash 'github-bot/gh-2824'
git switch 'main'
git merge --ff-only 'github-bot/gh-2824'
git switch 'main'
git merge 'github-bot/gh-2824'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!2824
No description provided.