-
Notifications
You must be signed in to change notification settings - Fork 148
Expand file tree
/
Copy pathRunPerfTests.ps1
More file actions
43 lines (34 loc) · 892 Bytes
/
RunPerfTests.ps1
File metadata and controls
43 lines (34 loc) · 892 Bytes
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
41
42
43
[CmdletBinding()]
param (
[Parameter(Mandatory = $false)]
[string]
$Filter = "*"
)
echo "perf: Performance tests started with Filter = $Filter"
try
{
Push-Location $PSScriptRoot
$artifactsPath = "$PSScriptRoot\artifacts\perftests"
if (Test-Path "$artifactsPath")
{
echo "perf: Cleaning $artifactsPath"
Remove-Item "$artifactsPath" -Force -Recurse
}
New-Item -Path "$artifactsPath" -ItemType Directory
$perfTestProjectPath = "$PSScriptRoot/test/Serilog.Sinks.MSSqlServer.PerformanceTests"
try
{
Push-Location "$perfTestProjectPath"
echo "perf: Running performance test project in $perfTestProjectPath"
& dotnet run -c Release -- -f $Filter
cp ".\BenchmarkDotNet.Artifacts\results\*.*" "$artifactsPath\"
}
finally
{
Pop-Location
}
}
finally
{
Pop-Location
}