Skip to content

Commit 77cd19d

Browse files
andresrsanchezNickCraver
authored andcommitted
Fix performance tests (#1331)
Hi! This PR tries to fix Dapper.Performance.Tests, actually you can't get [MemoryDiagnoser](https://benchmarkdotnet.org/api/BenchmarkDotNet.Diagnosers.MemoryDiagnoser.html) stats because ```IDiagnoser.GetColumnProvider()``` method was gone on BenchmarkDotnet 0.11.2. I choose ```DefaultColumnProviders.Metrics``` because of [this](dotnet/BenchmarkDotNet#1184 (comment)), i think it's the most simple way to add stats now. **Before** ![image](https://user-images.githubusercontent.com/34173061/65264060-1a5f7780-db0e-11e9-9c8c-bb4c69a808df.png) **After** ![image](https://user-images.githubusercontent.com/34173061/65264158-4f6bca00-db0e-11e9-9313-597b09070ae6.png) On the other hand i choose removing ```[Ordered]``` as temporal solution of dotnet/BenchmarkDotNet#1238, and yeah, the results are still ordered because of https://github.com/StackExchange/Dapper/blob/9282ef2872e1c82c68c86f31e93e8f1ceaacd409/Dapper.Tests.Performance/Config.cs#L42 **Before** ![image](https://user-images.githubusercontent.com/34173061/65264660-6232ce80-db0f-11e9-9046-9c2d8fc5e2d8.png) **After** (No errors) Thanks for all!!
1 parent 4dbf74f commit 77cd19d

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

Dapper.Tests.Performance/Benchmarks.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
namespace Dapper.Tests.Performance
88
{
9-
[Orderer(SummaryOrderPolicy.FastestToSlowest)]
109
[BenchmarkCategory("ORM")]
1110
public abstract class BenchmarkBase
1211
{

Dapper.Tests.Performance/Config.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public Config()
3131
//Add(StatisticColumn.StdDev);
3232
//Add(StatisticColumn.Error);
3333
Add(BaselineRatioColumn.RatioMean);
34-
//Add(md.GetColumnProvider());
34+
Add(DefaultColumnProviders.Metrics);
3535

3636
Add(Job.ShortRun
3737
.WithLaunchCount(1)

0 commit comments

Comments
 (0)