-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathrun-benchmarks.ps1
More file actions
31 lines (25 loc) · 846 Bytes
/
run-benchmarks.ps1
File metadata and controls
31 lines (25 loc) · 846 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
param(
[string]$Filter = "*",
[switch]$Disasm,
[switch]$NoRebuild
)
$ErrorActionPreference = "Stop"
$repoRoot = $PSScriptRoot
$project = Join-Path $repoRoot "benchmarks\TrimDB.Benchmarks"
$artifacts = Join-Path $repoRoot "BenchmarkDotNet.Artifacts"
if (-not $NoRebuild) {
Write-Host "Building benchmarks in Release..." -ForegroundColor Cyan
dotnet build $project -c Release --nologo
if ($LASTEXITCODE -ne 0) {
Write-Host "Build failed." -ForegroundColor Red
exit 1
}
}
$bdnArgs = @("--filter", $Filter, "--artifacts", $artifacts)
if ($Disasm) {
$bdnArgs += "--disasm"
}
Write-Host "Running benchmarks with filter: $Filter" -ForegroundColor Cyan
dotnet run --project $project -c Release --no-build -- @bdnArgs
Write-Host ""
Write-Host "Artifacts written to: $artifacts" -ForegroundColor Green