Add CSG perf fixtures and polygon category splitting

This commit is contained in:
Meta Vens 2026-05-07 01:50:49 +01:00
commit f7df565813
7 changed files with 537 additions and 5 deletions

41
tools/run_csg_perf.ps1 Normal file
View file

@ -0,0 +1,41 @@
param(
[string]$OutputPath = ".\experiments\generated\csg-perf-latest.jsonl",
[string]$ReferenceCommand = $env:VIBEGEOMETRY_REFERENCE_CSG_PERF
)
$ErrorActionPreference = "Stop"
$root = Split-Path -Parent $PSScriptRoot
$resolvedOutput = Join-Path $root $OutputPath
$outputDir = Split-Path -Parent $resolvedOutput
New-Item -ItemType Directory -Force -Path $outputDir | Out-Null
Push-Location $root
try {
cargo build --release -p vg_csg --example csg_perf_fixture | Out-Host
$exe = Join-Path $root "target\release\examples\csg_perf_fixture.exe"
if (!(Test-Path $exe)) {
throw "Missing vg_csg perf fixture executable: $exe"
}
& $exe | Set-Content -Path $resolvedOutput -Encoding utf8
if ($ReferenceCommand) {
$referenceOutput = & cmd /c $ReferenceCommand
foreach ($line in $referenceOutput) {
Add-Content -Path $resolvedOutput -Value $line -Encoding utf8
}
} else {
$missing = @{
kernel = "reference"
status = "missing"
reason = "Set VIBEGEOMETRY_REFERENCE_CSG_PERF or pass -ReferenceCommand with an executable that emits the same JSONL scenario records."
} | ConvertTo-Json -Compress
Add-Content -Path $resolvedOutput -Value $missing -Encoding utf8
}
Get-Content -Path $resolvedOutput
} finally {
Pop-Location
}