From e13e637d0223fdb0e7af5fb841db5e2d5e1119e9 Mon Sep 17 00:00:00 2001 From: Youssef1313 Date: Fri, 13 Mar 2026 13:55:09 +0100 Subject: [PATCH] Disable tiered compilation in integration tests --- .../Helpers/AcceptanceFixture.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/Helpers/AcceptanceFixture.cs b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/Helpers/AcceptanceFixture.cs index 573fd3456e..267818c89c 100644 --- a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/Helpers/AcceptanceFixture.cs +++ b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/Helpers/AcceptanceFixture.cs @@ -13,6 +13,22 @@ public static void AssemblyInitialize(TestContext context) { NuGetGlobalPackagesFolder = new(".packages"); Environment.SetEnvironmentVariable("MSBUILDDISABLENODEREUSE", "1"); + + // Our MSTest/MTP integration tests run lots of builds via 'dotnet build' in child processes. + // Profiling that, we noticed lots of time is spent jitting. + // In one of the investigated occurrences, we saw this data: + // Process CPU time 21.11 seconds. + // 58.2% of that is jitting, which is roughly 12.28 seconds. + // From the trace: + // - Jitting trigger: Foreground -> 2.65 seconds. + // - Jitting trigger: Tiered Compilation Background -> 9.63 seconds + // + // Above was running: + // /.dotnet/dotnet.exe" build \artifacts\tmp\Debug\testsuite\Umx6q\DataRowTests -c Release -p:MSBuildTreatWarningsAsErrors=true -p:TreatWarningsAsErrors=true -p:SuppressNETCoreSdkPreviewMessage=true -bl:"\artifacts\tmp\Debug\testsuite\DataRowTests-87.binlog + // + // The whole MSTest.Acceptance.IntegrationTests run when running with tiered compilation enabled locally was roughly 30 minutes. + // After disabling tiered compilation, it went down to 20 minutes locally. + Environment.SetEnvironmentVariable("DOTNET_TieredCompilation", "0"); } [AssemblyCleanup]