Skip to content

Commit

Permalink
Add MemoryDiagnoser and OpsPerSecond back to benchmark config (#23839)
Browse files Browse the repository at this point in the history
  • Loading branch information
roji committed Jan 10, 2021
1 parent fc29d1c commit 4149be5
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion benchmark/EFCore.Benchmarks/EFCoreBenchmarkRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System.Reflection;
using BenchmarkDotNet.Columns;
using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Diagnosers;
using BenchmarkDotNet.Running;

namespace Microsoft.EntityFrameworkCore.Benchmarks
Expand All @@ -11,7 +13,13 @@ public static class EFCoreBenchmarkRunner
{
public static void Run(string[] args, Assembly assembly, IConfig config = null)
{
BenchmarkSwitcher.FromAssembly(assembly).Run(args);
config ??= DefaultConfig.Instance;

config = config
.AddDiagnoser(MemoryDiagnoser.Default)
.AddColumn(StatisticColumn.OperationsPerSecond);

BenchmarkSwitcher.FromAssembly(assembly).Run(args, config);
}
}
}

0 comments on commit 4149be5

Please sign in to comment.