Skip to content

Commit

Permalink
Merge pull request #16 from ckadluba/benchmark-tests
Browse files Browse the repository at this point in the history
wip
  • Loading branch information
ckadluba authored Sep 30, 2024
2 parents 5f6b6c0 + 8c2b60e commit d07ab1d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
3 changes: 1 addition & 2 deletions RunPerfTests.ps1
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
Push-Location $PSScriptRoot

if (-not (Test-Path "artifacts")) {
Remove-Item .\artifacts -Force -Recurse
New-Item -Path $directoryPath -ItemType Directory
New-Item -Path "artifacts" -ItemType Directory
}

foreach ($test in Get-ChildItem "$PSScriptRoot/test" -Filter "*.PerformanceTests" -Directory) {
Expand Down
9 changes: 7 additions & 2 deletions test/Serilog.Sinks.MSSqlServer.PerformanceTests/Harness.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using BenchmarkDotNet.Running;
using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Running;
using Xunit;

namespace Serilog.Sinks.MSSqlServer.PerformanceTests;
Expand All @@ -14,6 +15,10 @@ public class Harness
[Fact]
public void Pipeline()
{
BenchmarkRunner.Run<PipelineBenchmark>();
var config = ManualConfig.Create(DefaultConfig.Instance)
.WithOptions(ConfigOptions.DisableOptimizationsValidator)
.WithOptions(ConfigOptions.DontOverwriteResults);

BenchmarkRunner.Run<PipelineBenchmark>(config);
}
}

0 comments on commit d07ab1d

Please sign in to comment.