Skip to content

Commit 8b61591

Browse files
authored
use ImmutableConfig when doing apples-to-apples comparison (#2193)
1 parent 761590e commit 8b61591

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/BenchmarkDotNet/Running/BenchmarkSwitcher.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ internal IEnumerable<Summary> RunWithDirtyAssemblyResolveHelper(string[] args, I
114114

115115
if (effectiveConfig.Options.HasFlag(ConfigOptions.ApplesToApples))
116116
{
117-
return ApplesToApples(effectiveConfig, benchmarksToFilter, logger, options);
117+
return ApplesToApples(ImmutableConfigBuilder.Create(effectiveConfig), benchmarksToFilter, logger, options);
118118
}
119119

120120
var filteredBenchmarks = TypeFilter.Filter(effectiveConfig, benchmarksToFilter);
@@ -140,7 +140,7 @@ private static void PrintList(ILogger nonNullLogger, IConfig effectiveConfig, IR
140140
printer.Print(testNames, nonNullLogger);
141141
}
142142

143-
private IEnumerable<Summary> ApplesToApples(ManualConfig effectiveConfig, IReadOnlyList<Type> benchmarksToFilter, ILogger logger, CommandLineOptions options)
143+
private IEnumerable<Summary> ApplesToApples(ImmutableConfig effectiveConfig, IReadOnlyList<Type> benchmarksToFilter, ILogger logger, CommandLineOptions options)
144144
{
145145
var jobs = effectiveConfig.GetJobs().ToArray();
146146
if (jobs.Length <= 1)

0 commit comments

Comments
 (0)