Skip to content

[tests] Skip PerformanceTest on slow CI machines using evaluation time#11249

Merged
simonrozsival merged 2 commits intomainfrom
jonathanpeppers/perf-test-skip-slow-ci
May 1, 2026
Merged

[tests] Skip PerformanceTest on slow CI machines using evaluation time#11249
simonrozsival merged 2 commits intomainfrom
jonathanpeppers/perf-test-skip-slow-ci

Conversation

@jonathanpeppers
Copy link
Copy Markdown
Member

Summary

Performance tests commonly fail on slow CI machines, not due to actual regressions but because the machine is too slow for reliable measurements. This PR detects slow machines by checking the MSBuild project evaluation time from the binlog.

Changes

When a performance test exceeds its expected time, we now check the max ProjectEvaluation duration from the binlog:

  • If evaluation > 500msAssert.Inconclusive() (test skipped, not failed)
  • If evaluation ≤ 500ms → Assert.Fail() (genuine regression)

Also refactored binlog reading so BinaryLog.ReadBuild() is called once per iteration, with the Build object passed to helper methods instead of each method re-reading the file.

Data

Analysis of 10 recent CI failure binlogs:

Eval (ms) Build (ms)
810 3027
854 4183
783 4877
558 2816
751 7253
795 5706
842 9680
660 3599
628 5079
778 5379

All failures had eval times 558–854ms. Normal machines should be ~200–350ms, so the 500ms threshold catches slow machines with comfortable margin.

When a performance test exceeds its expected time, check the MSBuild
project evaluation duration from the binlog. If evaluation alone
exceeds 500ms (normal is ~200-350ms), the CI machine is too slow for
reliable performance measurements. Use Assert.Inconclusive() instead
of Assert.Fail() so the test is marked as skipped rather than failed.

Analysis of 10 recent CI failures showed evaluation times of 558-854ms
on slow machines, while normal machines should be well under 500ms.

Also refactored binlog reading so BinaryLog.ReadBuild() is called once
per iteration, with the Build object passed to helper methods.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 29, 2026 20:03
Copy link
Copy Markdown
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

Updates the MSBuild device integration performance tests to reduce false CI failures on slow machines by using MSBuild binlog project evaluation time as a “machine speed” signal.

Changes:

  • Adds a slow-machine detector using the maximum ProjectEvaluation duration from the binlog to decide between Assert.Inconclusive() vs Assert.Fail().
  • Refactors binlog handling so BinaryLog.ReadBuild() is done once per iteration and the parsed Build is passed to duration helpers.

Comment thread tests/MSBuildDeviceIntegration/Tests/PerformanceTest.cs
Comment thread tests/MSBuildDeviceIntegration/Tests/PerformanceTest.cs
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jonathanpeppers jonathanpeppers added the ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable). label Apr 30, 2026
@jonathanpeppers
Copy link
Copy Markdown
Member Author

All the PerformanceTest passed, we might have to merge this and find out if it improves things.

@simonrozsival simonrozsival merged commit 46588d6 into main May 1, 2026
3 checks passed
@simonrozsival simonrozsival deleted the jonathanpeppers/perf-test-skip-slow-ci branch May 1, 2026 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants