Skip to content

Commit

Permalink
remove old testId array
Browse files Browse the repository at this point in the history
  • Loading branch information
ProjectsByJackHe committed Jan 12, 2024
1 parent 780f97a commit 082216c
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions scripts/secnetperf-helpers.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -116,30 +116,32 @@ function Invoke-SecnetperfTest($MsQuicCommit, $commands, $exe, $json, $LogProfil
}

$env = 2

if ($isWindows) {
$env = 1
}

Write-Host $rawOutput

if ($testIds[$i].Contains("rps")) {
$transport = "quic"

if ($tcp -eq 1) {
$transport = "tcp"
}

if ($command.Contains("lowlat")) {
$latency_percentiles = '(?<=\d{1,3}(?:\.\d{1,2})?th: )\d+'
$Perc = [regex]::Matches($rawOutput, $latency_percentiles) | ForEach-Object {$_.Value}
$json[$testIds[$i]] = $Perc
$json["latency-$transport"] = $Perc
# TODO: SQL += ...
continue
}

$throughput = '@ (\d+) kbps'

$testId = $testIds[$i]
if ($tcp -eq 1) {
$testId += "-tcp"
} else {
$testId += "quic"
$metric = "download"
if ($command.Contains("-up")) {
$metric = "upload"
}
$testId += "-$MsQuicCommit"

foreach ($line in $rawOutput) {
if ($line -match $throughput) {
Expand All @@ -154,8 +156,8 @@ VALUES ($testid, '$MsQuicCommit', $env, $env, $num, NULL);
"@

# Generate JSON
$json[$testIds[$i]] = $num
# Generate JSON as intermediary file for dashboard
$json["throughput-$metric-$transport"] = $num
break
}
}
Expand Down

0 comments on commit 082216c

Please sign in to comment.