Skip to content

Commit 116b4e0

Browse files
committed
Added Core check with InProcess.
Removed redundant check with CoreRt.
1 parent c918e15 commit 116b4e0

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

tests/BenchmarkDotNet.IntegrationTests/MemoryDiagnoserTests.cs

+3-6
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,9 @@ private void AssertSurvived(IToolchain toolchain, Type benchmarkType, Dictionary
400400
{
401401
// Core has survived memory measurement problems.
402402
// See https://github.com/dotnet/runtime/issues/45446
403-
if (toolchain is CsProjCoreToolchain || toolchain is CoreRtToolchain) // CoreRt actually does measure accurately in a normal benchmark run, but doesn't with the specific version used in these tests.
403+
if (toolchain is CsProjCoreToolchain
404+
|| (toolchain.IsInProcess && RuntimeInformation.IsNetCore)
405+
|| toolchain is CoreRtToolchain) // CoreRt actually does measure accurately in a normal benchmark run, but doesn't with the specific version used in these tests.
404406
return;
405407

406408
var config = CreateConfig(toolchain, MemoryDiagnoser.WithSurvived);
@@ -410,11 +412,6 @@ private void AssertSurvived(IToolchain toolchain, Type benchmarkType, Dictionary
410412

411413
foreach (var benchmarkSurvivedValidator in benchmarkSurvivedValidators)
412414
{
413-
// CoreRT is missing some of the CoreCLR threading/task related perf improvements, so sizeof(Task<int>) calculated for CoreCLR < sizeof(Task<int>) on CoreRT
414-
// see https://github.com/dotnet/corert/issues/5705 for more
415-
if (benchmarkSurvivedValidator.Key == nameof(AccurateSurvived.AllocateTaskSurvive) && toolchain is CoreRtToolchain)
416-
continue;
417-
418415
var survivedBenchmarks = benchmarks.BenchmarksCases.Where(benchmark => benchmark.Descriptor.WorkloadMethodDisplayInfo == benchmarkSurvivedValidator.Key).ToArray();
419416

420417
foreach (var benchmark in survivedBenchmarks)

0 commit comments

Comments
 (0)