fix(lab): schedule all T-014 stability samples [T-014]
Harness governance / validate (push) Has been cancelled
Harness governance / validate (push) Has been cancelled
This commit is contained in:
@@ -802,9 +802,14 @@ try {
|
||||
$previousSampleAt = 0.0
|
||||
$initialInventory = Get-MediaInventory $script:productionAPIPort
|
||||
$samples = 0
|
||||
$requiredSamples = [int][Math]::Ceiling($targetSeconds / $sampleSeconds)
|
||||
$maximumUnconverged = 0
|
||||
while ($observation.Elapsed.TotalSeconds -lt $targetSeconds) {
|
||||
Start-Sleep -Seconds $sampleSeconds
|
||||
while ($samples -lt $requiredSamples) {
|
||||
$nextSampleAt = ($samples + 1) * $sampleSeconds
|
||||
$delayMilliseconds = [int][Math]::Ceiling(($nextSampleAt - $observation.Elapsed.TotalSeconds) * 1000)
|
||||
if ($delayMilliseconds -gt 0) {
|
||||
Start-Sleep -Milliseconds $delayMilliseconds
|
||||
}
|
||||
Assert-Alive $sourceMedia
|
||||
Assert-Alive $productionMedia
|
||||
Assert-Alive $sense
|
||||
@@ -848,7 +853,8 @@ try {
|
||||
$inboundMbps = if ($observationSeconds -gt 0) { ($inboundDelta * 8.0) / $observationSeconds / 1000000.0 } else { 0.0 }
|
||||
$databaseSizeBytes = [Int64](Get-PostgresScalar "SELECT pg_database_size('$databaseName')")
|
||||
$finalUnconverged = [int](Get-SenseMetric 'sense_reconcile_devices' '{state="unconverged"}')
|
||||
if ($finalUnconverged -ne 0 -or $maximumUnconverged -ne 0 -or $samples -lt [Math]::Floor($targetSeconds / $sampleSeconds)) {
|
||||
if ($observationSeconds -lt $targetSeconds -or $finalUnconverged -ne 0 -or
|
||||
$maximumUnconverged -ne 0 -or $samples -lt $requiredSamples) {
|
||||
throw 'formal observation did not satisfy sampling and convergence requirements'
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user