test(streaming): close lifecycle gate after cutover
This commit is contained in:
parent
db3ca59fd0
commit
4a205a3e56
7 changed files with 173 additions and 17 deletions
|
|
@ -20,7 +20,9 @@ $destinations = @(
|
|||
[pscustomobject]@{ Name = 'Aerlinthe'; Occurrence = 4; Exercise = $false },
|
||||
[pscustomobject]@{ Name = 'Sawato revisit'; Occurrence = 5; Exercise = $false },
|
||||
[pscustomobject]@{ Name = 'Holtburg'; Occurrence = 6; Exercise = $true },
|
||||
[pscustomobject]@{ Name = 'Caul return'; Occurrence = 7; Exercise = $true }
|
||||
[pscustomobject]@{ Name = 'Caul return'; Occurrence = 7; Exercise = $true },
|
||||
[pscustomobject]@{ Name = 'Sawato plateau'; Occurrence = 8; Exercise = $false },
|
||||
[pscustomobject]@{ Name = 'Caul plateau'; Occurrence = 9; Exercise = $false }
|
||||
)
|
||||
|
||||
$stamp = Get-Date -Format 'yyyyMMdd-HHmmss'
|
||||
|
|
@ -32,6 +34,7 @@ $stderrLog = "$prefix.err.log"
|
|||
$markerLog = "$prefix.markers.log"
|
||||
$sampleCsv = "$prefix.samples.csv"
|
||||
$reportJson = "$prefix.report.json"
|
||||
$artifactDir = "$prefix.artifacts"
|
||||
$routePath = Join-Path $Repository 'tools\connected-r6-soak.route.txt'
|
||||
$exe = Join-Path $Repository 'src\AcDream.App\bin\Release\net10.0\AcDream.App.exe'
|
||||
|
||||
|
|
@ -59,7 +62,7 @@ function Get-PatternCount([string]$Path, [string]$Pattern) {
|
|||
}
|
||||
|
||||
function Get-FrameProfiles([string]$Path) {
|
||||
return @(Read-LogLines $Path | Where-Object { $_.StartsWith('[frame-prof]', [StringComparison]::Ordinal) })
|
||||
return @(Read-LogLines $Path | Where-Object { $_.StartsWith('[frame-prof] n=', [StringComparison]::Ordinal) })
|
||||
}
|
||||
|
||||
function Wait-ForLogPattern(
|
||||
|
|
@ -206,6 +209,12 @@ function Capture-Sample(
|
|||
Profile = $ProfileLine
|
||||
}
|
||||
$samples.Add($sample)
|
||||
if ($null -eq $sample.ProfileFrames -or
|
||||
$null -eq $sample.CpuP95Ms -or
|
||||
$null -eq $sample.AllocP50Kb -or
|
||||
$null -eq $sample.UpdateP95Ms) {
|
||||
$failures.Add("${Destination}/${Phase}: frame-prof sample was missing required parsed metrics")
|
||||
}
|
||||
return $sample
|
||||
}
|
||||
|
||||
|
|
@ -245,14 +254,11 @@ function Observe-R6Exercise(
|
|||
}
|
||||
|
||||
function Add-RelativeGateFailures {
|
||||
$caulFirst = $samples | Where-Object { $_.Destination -eq 'Caul' -and $_.Phase -eq 'stationary' } | Select-Object -First 1
|
||||
$caulReturn = $samples | Where-Object { $_.Destination -eq 'Caul return' -and $_.Phase -eq 'stationary' } | Select-Object -First 1
|
||||
$sawatoFirst = $samples | Where-Object { $_.Destination -eq 'Sawato' -and $_.Phase -eq 'stationary' } | Select-Object -First 1
|
||||
$sawatoReturn = $samples | Where-Object { $_.Destination -eq 'Sawato revisit' -and $_.Phase -eq 'stationary' } | Select-Object -First 1
|
||||
$caulPlateau = $samples | Where-Object { $_.Destination -eq 'Caul plateau' -and $_.Phase -eq 'stationary' } | Select-Object -First 1
|
||||
|
||||
foreach ($pair in @(
|
||||
[pscustomobject]@{ Label = 'Caul return'; First = $caulFirst; Return = $caulReturn },
|
||||
[pscustomobject]@{ Label = 'Sawato revisit'; First = $sawatoFirst; Return = $sawatoReturn }))
|
||||
[pscustomobject]@{ Label = 'Caul plateau'; First = $caulReturn; Return = $caulPlateau }))
|
||||
{
|
||||
if ($null -eq $pair.First -or $null -eq $pair.Return) {
|
||||
$failures.Add("$($pair.Label): missing same-location stationary sample")
|
||||
|
|
@ -273,8 +279,8 @@ function Add-RelativeGateFailures {
|
|||
$warnings.Add("$($pair.Label): connected animation population changed $($pair.First.AnimationCount) -> $($pair.Return.AnimationCount)")
|
||||
}
|
||||
|
||||
$privateLimit = [Math]::Max(384.0, $pair.First.PrivateMiB * 0.35)
|
||||
$workingLimit = [Math]::Max(384.0, $pair.First.WorkingSetMiB * 0.35)
|
||||
$privateLimit = [Math]::Max(192.0, $pair.First.PrivateMiB * 0.20)
|
||||
$workingLimit = [Math]::Max(192.0, $pair.First.WorkingSetMiB * 0.20)
|
||||
if (($pair.Return.PrivateMiB - $pair.First.PrivateMiB) -gt $privateLimit) {
|
||||
$failures.Add("$($pair.Label): private memory grew by $([Math]::Round($pair.Return.PrivateMiB - $pair.First.PrivateMiB, 1)) MiB")
|
||||
}
|
||||
|
|
@ -305,7 +311,9 @@ function Add-LogFailures {
|
|||
'WeenieError',
|
||||
'device removed',
|
||||
'GPU reset',
|
||||
'live: disconnected'
|
||||
'live: disconnected',
|
||||
'[shutdown]',
|
||||
'ObjectDisposedException'
|
||||
)
|
||||
foreach ($pattern in $fatalPatterns) {
|
||||
$count = (Get-PatternCount $stdoutLog $pattern) + (Get-PatternCount $stderrLog $pattern)
|
||||
|
|
@ -369,6 +377,7 @@ $env:ACDREAM_UNCAPPED_RENDER = '1'
|
|||
$env:ACDREAM_DEVTOOLS = '0'
|
||||
$env:ACDREAM_UI_PROBE_DUMP = '0'
|
||||
$env:ACDREAM_UI_PROBE_SCRIPT = $routePath
|
||||
$env:ACDREAM_AUTOMATION_ARTIFACT_DIR = $artifactDir
|
||||
$env:ACDREAM_DUMP_MOVE_TRUTH = '1'
|
||||
$env:ACDREAM_NO_AUDIO = $null
|
||||
$env:ACDREAM_WB_DIAG = $null
|
||||
|
|
@ -422,7 +431,6 @@ try {
|
|||
}
|
||||
|
||||
Add-RelativeGateFailures
|
||||
Add-LogFailures
|
||||
|
||||
Write-Marker 'route-complete requesting graceful close'
|
||||
$gracefulExit = Close-ClientGracefully $process
|
||||
|
|
@ -430,6 +438,7 @@ try {
|
|||
if ($process.HasExited) { $exitCode = [int]$process.ExitCode }
|
||||
if (-not $gracefulExit) { $failures.Add('client did not exit through the graceful WM_CLOSE path') }
|
||||
if ($null -ne $exitCode -and $exitCode -ne 0) { $failures.Add("client exit code was $exitCode") }
|
||||
Add-LogFailures
|
||||
}
|
||||
catch {
|
||||
$failures.Add($_.Exception.Message)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue