You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AntiTerminal.StopUpdate() — _stringBuilder.ToString() allocates on every terminal-output flush; blocked on IConsole interface limitation (netstandard2.0 target). Low priority.
SilenceDrivenHeartbeatRenderer — allocations only on rare heartbeat/slow-test paths; not a hot path. Low priority.
ClassifyOutcome in TestResultCaptureHelper.cs — add explicit CancelledTestNodeStateProperty arm to avoid Array.IndexOf fallback for obsolete type. Very low priority.
Discovered Commands
# Build all projects (Debug)
./build.sh
# Build + run unit tests
./build.sh -test
# Pack NuGet packages (required before acceptance tests and performance runner)
./build.sh -pack
# Run acceptance integration tests (requires -pack first)
./build.sh -pack -test -integrationTest
# Run performance timing scenarios (requires -pack first)
.dotnet/dotnet run --project test/Performance/MSTest.Performance.Runner \
-- execute --pipelineNameFilter "*PlainProcess*"# Run a single test project (using installed SDK in .dotnet/)
.dotnet/dotnet run --project <project-path> -f net9.0 --no-build -- --treenode-filter "*/*/MyTestClass/*"
🔍 Task 2/3: Scanned UnitTestRunner.cs hot paths — found testContextForClassCleanup allocated unconditionally for every test even when isLastTestInClass is false and context is never used
🔍 Identified per-test Queue/Stack allocation in TestMethodInfo.Lifecycle.cs as next optimization target
🤖 Automated content by GitHub Copilot. Posted via a maintainer's GitHub token, so it appears under their account — the account owner did not write or approve this content personally. Generated by the Perf Improver workflow. · 2.3K AIC · ⌖ 40 AIC · ⊞ 57.7K · [◷]( · ◷)
Add this agentic workflows to your repo
To install this agentic workflow, run
gh aw add githubnext/agentics/workflows/perf-improver.md@main
Activity for June 2026
Suggested Actions for Maintainer
TestContextImplementationallocation to only the last test in each class — check recent PRsPerformance Opportunities Backlog
Queue/Stackallocation in MSTest adapter lifecycleArray.IndexOf(GetType())withispattern matching inTestApplicationResult,AbortForMaxFailedTestsExtension,RetryDataConsumerTestNodeUidallocation inPopulateTestNodeStatistics#9348 merged] Avoid redundantTestNodeUidallocation inPerRequestServerDataConsumer.PopulateTestNodeStatistics(server mode, 2×N per test run)TestContextImplementationallocations inUnitTestRunner.RunSingleTestAsync: for tests 2+ in an assembly/class, ~2 dictionary copies + 2CancellationTokenRegistrationallocs skipped per testTestContextImplementationallocation to last test only inRunSingleTestAsync— same pattern as [perf-improver] perf: skip unused TestContextImplementation allocations for repeat assembly/class init #9433, saves C×(K−1) allocations for C classes averaging K tests each (branchperf-assist/defer-class-cleanup-context-alloc)AntiTerminal.StopUpdate()—_stringBuilder.ToString()allocates on every terminal-output flush; blocked onIConsoleinterface limitation (netstandard2.0 target). Low priority.SilenceDrivenHeartbeatRenderer— allocations only on rare heartbeat/slow-test paths; not a hot path. Low priority.ClassifyOutcomeinTestResultCaptureHelper.cs— add explicitCancelledTestNodeStatePropertyarm to avoidArray.IndexOffallback for obsolete type. Very low priority.Discovered Commands
Run History
2026-06-26 15:00 UTC - Run
skip-unused-init-contexts) and PR [perf-improver] perf: add Linux job to nightly perf-timing workflow #9450 (Linux perf-timing job) both merged 2026-06-26 — no open perf-improver PRs remainingUnitTestRunner.cshot paths — foundtestContextForClassCleanupallocated unconditionally for every test even whenisLastTestInClassisfalseand context is never usedperf-assist/defer-class-cleanup-context-alloc— defer class-cleanupTestContextImplementationto last test only; saves C×(K−1) allocations per run (same pattern as [perf-improver] perf: skip unused TestContextImplementation allocations for repeat assembly/class init #9433)2026-06-25 14:30 UTC - Run
perf-assist/skip-unused-init-contexts— skip unusedTestContextImplementationallocations inRunSingleTestAsync: for tests 2+ in an assembly/class, avoids ~2 dictionary copies + 2CancellationTokenRegistrationregister/dispose pairs per test — MERGED as PR [perf-improver] perf: skip unused TestContextImplementation allocations for repeat assembly/class init #9433 on 2026-06-26#aw_linux_perfplaceholder (Linux perf-timing PR was never created in run 28105007003)2026-06-24 14:17 UTC - Run
DotnetTestDataConsumer([efficiency-improver] perf: single-pass PropertyBag collection in DotnetTestDataConsumer #9380) merged same dayubuntu-latestjob toperf-timing-nightly.yml— PR not created this run; created as PR [perf-improver] perf: add Linux job to nightly perf-timing workflow #9450 on 2026-06-26 and MERGED same day2026-06-23 UTC - Run
TestNodeUidallocation inPopulateTestNodeStatistics#9348 (avoid redundantTestNodeUidallocation) merged by Evangelink on 2026-06-232026-06-19 UTC - Run
new TestNodeUid(message.TestNode.Uid.Value)allocation inPopulateTestNodeStatisticsTestNodeUidallocation inPopulateTestNodeStatistics#9348: Avoid redundantTestNodeUidallocation (server mode, saves ~2×N short-lived allocations per test run) — MERGED by Evangelink on 2026-06-232026-06-21 14:14 UTC - Run
MSTest.Performance.Runner— found cross-platform timing gap (PlainProcess/DotnetTrace registered Windows-only despite using cross-platform APIs)2026-06-20 14:30 UTC - Run
Array.IndexOf(GetType())redundancy in per-test hot pathsArray.IndexOf(GetType())withispattern matching — MERGED by Evangelink on 2026-06-222026-06-17 - Run
SingleOrDefault()is already O(1) via_testNodeStatePropertyfast-path2026-06-15 - Run
Add this agentic workflows to your repo
To install this agentic workflow, run