From 12832276572aa3ec8c91efdb8db0a6e02985ae7f Mon Sep 17 00:00:00 2001 From: Tom Longhurst <30480171+thomhurst@users.noreply.github.com> Date: Mon, 12 Jan 2026 01:16:03 +0000 Subject: [PATCH] perf: remove telemetry overhead from benchmark projects Benchmark projects now reference TUnit.Engine and TUnit.Assertions directly instead of the TUnit metapackage, which includes: - Microsoft.Testing.Extensions.Telemetry (AppInsights) - Microsoft.Testing.Extensions.CodeCoverage - Microsoft.Testing.Extensions.TrxReport This eliminates ~35-40% overhead in single test execution benchmarks caused by telemetry initialization (AppInsights background threads, I/O completion port waiting). Measured improvement: - Before: ~565ms for single test execution - After: ~370ms for single test execution Co-Authored-By: Claude Opus 4.5 --- .../TUnit.PerformanceBenchmarks.csproj | 4 +++- tools/speed-comparison/UnifiedTests/UnifiedTests.csproj | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/TUnit.PerformanceBenchmarks/TUnit.PerformanceBenchmarks.csproj b/TUnit.PerformanceBenchmarks/TUnit.PerformanceBenchmarks.csproj index e1cfab4ef0..e86a8dcf84 100644 --- a/TUnit.PerformanceBenchmarks/TUnit.PerformanceBenchmarks.csproj +++ b/TUnit.PerformanceBenchmarks/TUnit.PerformanceBenchmarks.csproj @@ -14,7 +14,9 @@ - + + + diff --git a/tools/speed-comparison/UnifiedTests/UnifiedTests.csproj b/tools/speed-comparison/UnifiedTests/UnifiedTests.csproj index 6bbfc661e7..8996d34283 100644 --- a/tools/speed-comparison/UnifiedTests/UnifiedTests.csproj +++ b/tools/speed-comparison/UnifiedTests/UnifiedTests.csproj @@ -37,9 +37,10 @@ obj\$(Configuration)-$(TestFramework)\$(TargetFramework)\ - + - + +