[CmdletBinding()] param( [ValidateSet("release", "fast")] [string]$Profile = "release" ) $ErrorActionPreference = "Stop" $arguments = @("bench", "-p", "eonacat-xsbox-gpu", "--bench", "hot_paths") if ($Profile -eq "fast") { $arguments += @("--profile", "fast") } Write-Host "Building and running EonaCat.XSBOX CPU microbenchmarks..." cargo @arguments if ($LASTEXITCODE -ne 0) { throw "Cargo benchmark failed with exit code $LASTEXITCODE" }