зеркало из https://github.com/microsoft/msquic.git
Upload WanPerf data to artifacts for later parsing (#1177)
This commit is contained in:
Родитель
e526e94257
Коммит
baea006c94
|
@ -56,6 +56,21 @@ jobs:
|
|||
filePath: scripts/emulated-performance.ps1
|
||||
arguments: -NumIterations ${{ parameters.iterations }} -BottleneckMbps ${{ parameters.rateMbps }} -BottleneckQueueRatio ${{ parameters.bottleneckQueueRatio }} -DurationMs ${{ parameters.durationMs }} -RttMs ${{ parameters.rttMs }} -Pacing ${{ parameters.pacing }} -LogProfile ${{ parameters.logProfile }} -Config ${{ parameters.config }} -Arch ${{ parameters.arch }} -Tls ${{ parameters.tls }}
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: Move Performance Results
|
||||
condition: succeededOrFailed()
|
||||
inputs:
|
||||
sourceFolder: artifacts/PerfDataResults
|
||||
targetFolder: $(Build.ArtifactStagingDirectory)
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: Upload Performance Results
|
||||
condition: succeededOrFailed()
|
||||
inputs:
|
||||
artifactName: wanperformance
|
||||
pathToPublish: $(Build.ArtifactStagingDirectory)
|
||||
parallel: true
|
||||
|
||||
- ${{ if ne(parameters.logProfile, 'None') }}:
|
||||
- template: ./upload-test-artifacts.yml
|
||||
parameters:
|
||||
|
|
|
@ -123,13 +123,10 @@ if ($LogProfile -ne "None") {
|
|||
dir $LogScript | Write-Debug
|
||||
}
|
||||
|
||||
$Platform = $IsWindows ? "windows" : "linux"
|
||||
$ExeName = $IsWindows ? "quicperf.exe" : "quicperf"
|
||||
# Path to the quicperf exectuable.
|
||||
$QuicPerf = $null
|
||||
if ($IsWindows) {
|
||||
$QuicPerf = Join-Path $RootDir "\artifacts\bin\windows\$($Arch)_$($Config)_$($Tls)\quicperf.exe"
|
||||
} else {
|
||||
$QuicPerf = Join-Path $RootDir "/artifacts/bin/linux/$($Arch)_$($Config)_$($Tls)/quicperf"
|
||||
}
|
||||
$QuicPerf = Join-Path $RootDir "artifacts" "bin" $Platform "$($Arch)_$($Config)_$($Tls)" $ExeName
|
||||
|
||||
# Path to the netput exectuable.
|
||||
$NetPut = "C:\Windows\System32\netput.exe"
|
||||
|
@ -173,6 +170,64 @@ if ($UseTcp.Contains(1)) {
|
|||
# Wait for the server(s) to come up.
|
||||
Sleep -Seconds 1
|
||||
|
||||
$OutputDir = Join-Path $RootDir "artifacts" "PerfDataResults" $Platform "$($Arch)_$($Config)_$($Tls)" "WAN"
|
||||
New-Item -Path $OutputDir -ItemType Directory -Force | Out-Null
|
||||
$UniqueId = New-Guid
|
||||
$OutputFile = Join-Path $OutputDir "WANPerf_$($UniqueId.ToString("N")).json"
|
||||
|
||||
class TestResult {
|
||||
[int]$RttMs;
|
||||
[int]$BottleneckMbps;
|
||||
[int]$BottleneckBufferPackets;
|
||||
[int]$RandomLossDenominator;
|
||||
[int]$RandomReorderDenominator;
|
||||
[int]$ReorderDelayDeltaMs;
|
||||
[bool]$Tcp;
|
||||
[int]$DurationMs;
|
||||
[bool]$Pacing;
|
||||
[int]$RateKbps;
|
||||
[System.Collections.Generic.List[int]]$RawRateKbps;
|
||||
|
||||
TestResult (
|
||||
[int]$RttMs,
|
||||
[int]$BottleneckMbps,
|
||||
[int]$BottleneckBufferPackets,
|
||||
[int]$RandomLossDenominator,
|
||||
[int]$RandomReorderDenominator,
|
||||
[int]$ReorderDelayDeltaMs,
|
||||
[bool]$Tcp,
|
||||
[int]$DurationMs,
|
||||
[bool]$Pacing,
|
||||
[int]$RateKbps,
|
||||
[System.Collections.Generic.List[int]]$RawRateKbps
|
||||
) {
|
||||
$this.RttMs = $RttMs;
|
||||
$this.BottleneckMbps = $BottleneckMbps;
|
||||
$this.BottleneckBufferPackets = $BottleneckBufferPackets;
|
||||
$this.RandomLossDenominator = $RandomLossDenominator;
|
||||
$this.RandomReorderDenominator = $RandomReorderDenominator;
|
||||
$this.ReorderDelayDeltaMs = $ReorderDelayDeltaMs;
|
||||
$this.Tcp = $Tcp;
|
||||
$this.DurationMs = $DurationMs;
|
||||
$this.Pacing = $Pacing;
|
||||
$this.RateKbps = $RateKbps;
|
||||
$this.RawRateKbps = $RawRateKbps;
|
||||
}
|
||||
}
|
||||
|
||||
class Results {
|
||||
[System.Collections.Generic.List[TestResult]]$Runs;
|
||||
[string]$PlatformName
|
||||
|
||||
Results($PlatformName) {
|
||||
$this.Runs = [System.Collections.Generic.List[TestResult]]::new()
|
||||
$this.PlatformName = $PlatformName
|
||||
}
|
||||
}
|
||||
|
||||
$PlatformName = (($IsWindows ? "Windows" : "Linux") + "_$($Arch)_$($Tls)")
|
||||
$RunResults = [Results]::new($PlatformName)
|
||||
|
||||
# CSV header
|
||||
$Header = "RttMs, BottleneckMbps, BottleneckBufferPackets, RandomLossDenominator, RandomReorderDenominator, ReorderDelayDeltaMs, Tcp, DurationMs, Pacing, RateKbps"
|
||||
for ($i = 0; $i -lt $NumIterations; $i++) {
|
||||
|
@ -220,7 +275,7 @@ foreach ($ThisReorderDelayDeltaMs in $ReorderDelayDeltaMs) {
|
|||
foreach ($ThisPacing in $Pacing) {
|
||||
|
||||
# Run through all the iterations and keep track of the results.
|
||||
$Results = [System.Collections.ArrayList]@()
|
||||
$Results = [System.Collections.Generic.List[int]]::new()
|
||||
Write-Debug "Run upload test: Duration=$ThisDurationMs ms, Pacing=$ThisPacing"
|
||||
for ($i = 0; $i -lt $NumIterations; $i++) {
|
||||
|
||||
|
@ -291,7 +346,11 @@ foreach ($ThisReorderDelayDeltaMs in $ReorderDelayDeltaMs) {
|
|||
for ($i = 0; $i -lt $NumIterations; $i++) {
|
||||
$Row += ", $($Results[$i])"
|
||||
}
|
||||
$RunResult = [TestResult]::new($ThisRttMs, $ThisBottleneckMbps, $ThisBottleneckBufferPackets, $ThisRandomLossDenominator, $ThisRandomReorderDenominator, $ThisReorderDelayDeltaMs, $ThisUseTcp, $ThisDurationMs, $ThisPacing, $RateKbps, $Results);
|
||||
$RunResults.Runs.Add($RunResult)
|
||||
Write-Host $Row
|
||||
}}}
|
||||
|
||||
}}}}}}
|
||||
|
||||
$RunResults | ConvertTo-Json -Depth 100 | Out-File $OutputFile
|
||||
|
|
Загрузка…
Ссылка в новой задаче