Skip to content

Commit

Permalink
add reading and saving data
Browse files Browse the repository at this point in the history
  • Loading branch information
ProjectsByJackHe committed Dec 20, 2023
1 parent 43e6249 commit 3bf4cde
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions scripts/secnetperf.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,18 @@ for ($i = 0; $i -lt $commands.Count; $i++) {
continue
}

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

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

foreach ($line in $rawOutput) {
if ($line -match $pattern) {
if ($line -match $throughput) {

$num = $matches[1]

Expand Down

0 comments on commit 3bf4cde

Please sign in to comment.