forked from microsoft/msquic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrps.ps1
40 lines (32 loc) · 1.05 KB
/
rps.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<#
.SYNOPSIS
Runs the client side of the RPS performance tests for multiple different
configurations.
.PARAMETER Target
The name or IP address of the server machine to connect to.
.PARAMETER Iterations
The number of runs for each configuration.
#>
param (
[Parameter(Mandatory = $false)]
[string]$Target = "quic-server",
[Parameter(Mandatory = $false)]
[Int32]$Iterations = 3
)
Set-StrictMode -Version 'Latest'
$PSDefaultParameterValues['*:ErrorAction'] = 'Stop'
# Run through all the different connection and request counts.
for ($Conns=100; $Conns -le 1000; $Conns+=100) {
for ($RequestsPerConn=1; $RequestsPerConn -le 8; $RequestsPerConn+=1) {
$Requests = $Conns * $RequestsPerConn
Write-Host "==$($Conns)c$($Requests)r=="
for ($i=0; $i -lt $Iterations; $i++) {
(.\secnetperf.exe `
-Test:RPS `
-Target:$Target `
-conns:$Conns `
-requests:$Requests) | Select-Object -Last 2
Start-Sleep -Milliseconds 2000
}
}
}