Skip to content

Split ILLink test classes to improve Helix shard distribution#53453

Open
marcpopMSFT wants to merge 1 commit intomainfrom
marcpopMSFT-PRPerfimprovements
Open

Split ILLink test classes to improve Helix shard distribution#53453
marcpopMSFT wants to merge 1 commit intomainfrom
marcpopMSFT-PRPerfimprovements

Conversation

@marcpopMSFT
Copy link
Member

See https://github.com/dotnet/sdk/blob/ff559048ffe5b233c53abb0dcd64fcc469ffa1e4/documentation/general/pr-build-performance-analysis.md for more details. This was a low hanging fruit option for improving PR performance.

Further split GivenThatWeWantToRunILLink1/2/3 classes in Microsoft.NET.Publish.Tests to reduce the 16-21 minute Helix shards (the 2nd-longest items in the PR build pipeline).

Each ILLink class is split roughly in half:

  • ILLink1: 27 tests -> 14 (original) + 13 (ILLink1b)
  • ILLink2: 15 tests -> 8 (original) + 7 (ILLink2b)
  • ILLink3: 14 tests -> 7 (original) + 7 (ILLink3b)

Total test count preserved: 56 across 6 classes.
The AssemblyScheduler (methodLimit=16) will now distribute these into more balanced shards, reducing maximum shard execution time.

Further split GivenThatWeWantToRunILLink1/2/3 classes in
Microsoft.NET.Publish.Tests to reduce the 16-21 minute Helix shards
(the 2nd-longest items in the PR build pipeline).

Each ILLink class is split roughly in half:
- ILLink1: 27 tests -> 14 (original) + 13 (ILLink1b)
- ILLink2: 15 tests -> 8 (original) + 7 (ILLink2b)
- ILLink3: 14 tests -> 7 (original) + 7 (ILLink3b)

Total test count preserved: 56 across 6 classes.
The AssemblyScheduler (methodLimit=16) will now distribute these
into more balanced shards, reducing maximum shard execution time.
@marcpopMSFT marcpopMSFT requested a review from a team as a code owner March 13, 2026 21:43
Copilot AI review requested due to automatic review settings March 13, 2026 21:43
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors the ILLink publish test suite to improve Helix shard/workitem distribution by splitting large test classes into additional smaller classes, reducing long-running shards in PR pipelines.

Changes:

  • Split portions of existing ILLink test coverage into three new test classes/files: GivenThatWeWantToRunILLink1b, GivenThatWeWantToRunILLink2b, and GivenThatWeWantToRunILLink3b.
  • Removed the moved tests from GivenThatWeWantToRunILLink.cs while keeping total test coverage/count the same.
  • Preserved existing test logic/assertions while improving scheduling granularity.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
test/Microsoft.NET.Publish.Tests/GivenThatWeWantToRunILLink.cs Removes test methods that were moved into new split-out classes; keeps remaining ILLink test classes intact.
test/Microsoft.NET.Publish.Tests/GivenThatWeWantToRunILLink1b.cs New split-out class containing roughly half of the former ILLink1 tests.
test/Microsoft.NET.Publish.Tests/GivenThatWeWantToRunILLink2b.cs New split-out class containing roughly half of the former ILLink2 tests.
test/Microsoft.NET.Publish.Tests/GivenThatWeWantToRunILLink3b.cs New split-out class containing roughly half of the former ILLink3 tests.

Comment on lines +176 to +179
var intermediateLinkDir = Path.Combine(intermediateDirectory, "linked");
var linkedDirectory = Path.Combine(intermediateDirectory, "linked");

var linkSemaphore = Path.Combine(intermediateLinkDir, "Link.semaphore");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants