[NO-TICKET] Reduce Ruby heap test scenario variation - #154
Draft
ivoanjo wants to merge 1 commit into
Draft
Conversation
**What does this PR do?** This PR adds an additional GC trigger and sleep at the beginning of the Ruby heap test scenarios so that the GC and dynamic sampling rate start with a clean slate. **Motivation:** We've seen these tests flake due to run-to-run variation. Rather than loosening the error ranges in the `expected_profile.json` files, I experimented locally with this "try to create a clean slate" approach and I was getting more accurate results without needing to loosen errors. In particular the "ruby_heap" and "ruby_heap_r4" tests don't do a lot of allocations (e.g. when compared to "ruby_heap_highload" and "ruby_heap_highload_r4") and thus cause a lot more run-to-run variation. (Which kinda makes sense? The less allocations, the less the dynamic sampling rate has to work with, and with small numbers we get more noise in the reads) **Additional Notes:** N/A **How to test the change?** Green CI is the target! If not, we'll keep at it :)
|
Member
Author
|
Hmm looks like this wasn't enough yet... Will keep at it |
ivoanjo
marked this pull request as draft
June 10, 2026 18:00
r1viollet
pushed a commit
that referenced
this pull request
Jul 3, 2026
**What does this PR do?** This PR marks all Ruby heap-related tests as flaky, renaming the folders so they don't run by default in CI. **Motivation:** This PR attempts to "stop the bleeding" relating to the Ruby Heap tests being flaky: it's really annoying that these failures keep showing up in other prof-correctness where nothing changed for Ruby. I've started #154 to try to actually fix things, but until we have a good fix in place, let's avoid the annoyance to everyone else. **Additional Notes:** N/A **How to test the change?** Validate that `ruby_heap` tests are no longer running in CI (and CI is still green).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR adds an additional GC trigger and sleep at the beginning of the Ruby heap test scenarios so that the GC and dynamic sampling rate start with a clean slate.
Motivation:
We've seen these tests flake due to run-to-run variation. Rather than loosening the error ranges in the
expected_profile.jsonfiles, I experimented locally with this "try to create a clean slate" approach and I was getting more accurate results without needing to loosen errors.In particular the "ruby_heap" and "ruby_heap_r4" tests don't do a lot of allocations (e.g. when compared to "ruby_heap_highload" and "ruby_heap_highload_r4") and thus cause a lot more run-to-run variation.
(Which kinda makes sense? The less allocations, the less the dynamic sampling rate has to work with, and with small numbers we get more noise in the reads)
Additional Notes:
N/A
How to test the change?
Green CI is the target! If not, we'll keep at it :)