Skip to content

chore: Add warmups steps for flaky tests (AllocationQuantumIsNotAnIssueForNetCore21Plus) #2782

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 15, 2025

Conversation

filzrev
Copy link
Contributor

@filzrev filzrev commented Jun 15, 2025

This PR intended to fix #2779.

Currently AllocationQuantumIsNotAnIssueForNetCore21Plus test failed randomly.
And report unexpected memory allocations.

It's expected to be caused by JIT related behaviors.
So I've added warmup 3-times settings for this benchmark.

Currently this PR is draft.
I'll try several runs to see if the problem is resolved by this changes.

@timcassell
Copy link
Collaborator

timcassell commented Jun 15, 2025

3 warmup is not enough to guarantee tier1 JIT. It's undocumented, but currently it requires at least 60 invocations. To guarantee tier1 JIT, we have to apply aggressive optimization.

@filzrev
Copy link
Contributor Author

filzrev commented Jun 15, 2025

I've modified warmup count value to 2.
As far as I've confirmed. At least 2 warmup required for stable report.

  • WarmupCount=0: 3/10 tests failed
  • WarmupCount=1: 1/100 tests failed.

@filzrev filzrev marked this pull request as ready for review June 15, 2025 10:46
Update MemoryDiagnoserTests.cs

t
Copy link
Collaborator

@timcassell timcassell left a comment

Choose a reason for hiding this comment

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

Thanks

@timcassell timcassell merged commit 27d864a into dotnet:master Jun 15, 2025
9 checks passed
@timcassell timcassell added this to the v0.15.2 milestone Jun 15, 2025
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.

AllocationQuantumIsNotAnIssueForNetCore21Plus tests randomly failed on macos (arm64)
2 participants