Make WAN Perf Previous Results Failure Resilient
@@ -325,7 +325,14 @@ Set-NetAdapterLso duo? -IPv4Enabled $false -IPv6Enabled $false -NoRestart
$RunResults = [Results]::new($PlatformName)
+$RemoteResults = ""
+if ($PreviousResults -ne "") {
+ try {
$RemoteResults = $PreviousResults.$PlatformName
+ } catch {
+ Write-Debug "Failed to get $PlatformName from previous results"
+ }
+}
# Loop over all the network emulation configurations.
foreach ($ThisRttMs in $RttMs) {
@@ -424,6 +431,7 @@ foreach ($ThisReorderDelayDeltaMs in $ReorderDelayDeltaMs) {
$RunResult = [TestResult]::new($ThisRttMs, $ThisBottleneckMbps, $ThisBottleneckBufferPackets, $ThisRandomLossDenominator, $ThisRandomReorderDenominator, $ThisReorderDelayDeltaMs, $UseTcp, $ThisDurationMs, $ThisPacing, $RateKbps, $Results);
$RunResults.Runs.Add($RunResult)
Write-Host $Row
+ if ($RemoteResults -ne "") {
$RemoteResult = Find-MatchingTest -TestResult $RunResult -RemoteResults $RemoteResults
if ($null -ne $RemoteResult) {
$MedianLastResult = $RemoteResult.RateKbps
@@ -433,6 +441,11 @@ foreach ($ThisReorderDelayDeltaMs in $ReorderDelayDeltaMs) {
$PercentDiffStr = "+$PercentDiffStr"
}
Write-Output "Median: $RateKbps, Remote: $MedianLastResult, ($PercentDiffStr%)"
+ } else {
+ Write-Output "Median: $RateKbps"
+ }
+ } else {
+ Write-Output "Median: $RateKbps"
}
}}}
