fix timeout bug
This commit is contained in:
Родитель
c73c4b153d
Коммит
f46f13459f
|
@ -36,10 +36,10 @@ Param ([Int]$AdditionalTimeout, [string] $Line)
|
|||
try {
|
||||
$runtime = 0
|
||||
if ($Line.Contains("-run")) {
|
||||
[Int] $runtime = [Int]($Line.Substring($Line.IndexOf("-run")).Split(" ")[0].Split(":")[1]) / 1000
|
||||
} else {
|
||||
[Int] $runtime = [Int]($Line.Substring($Line.IndexOf("-up")).Split(" ")[0].Split(":")[1]) / 1000
|
||||
$runtime += [Int]($Line.Substring($Line.IndexOf("-down")).Split(" ")[0].Split(":")[1]) / 1000
|
||||
[Int] $runtime = [Int]($Line.Substring($Line.IndexOf("-run")).Split(" ")[0].Split(":")[1] -replace '[^0-9]')
|
||||
} elseif ($Line.Contains("-up") -or $Line.Contains("-down")) {
|
||||
[Int] $runtime = [Int]($Line.Substring($Line.IndexOf("-up")).Split(" ")[0].Split(":")[1] -replace '[^0-9]')
|
||||
$runtime += [Int]($Line.Substring($Line.IndexOf("-down")).Split(" ")[0].Split(":")[1] -replace '[^0-9]')
|
||||
}
|
||||
return $runtime
|
||||
}
|
||||
|
|
|
@ -180,7 +180,7 @@ function test_throughput {
|
|||
$dir = (Join-Path -Path $OutDir -ChildPath $Proto)
|
||||
$send_dir = (Join-Path -Path $SendDir -ChildPath $Proto)
|
||||
New-Item -ItemType directory -Path $dir | Out-Null
|
||||
$Config = $g_Config.TestType.Handshakes.$Proto
|
||||
$Config = $g_Config.TestType.Throughput.$Proto
|
||||
for ($j=0; $j -lt $Config.Connections.Length; $j++) {
|
||||
$Conn = $Config.Connections[$j]
|
||||
for ($k=0; $k -lt $Config.BufferLen.Length; $k++) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче