Skip to content

Commit

Permalink
Lower dynamic sampling rate target to avoid flakiness
Browse files Browse the repository at this point in the history
This test for the "Skipped Samples" placeholder failed in CI:
<https://app.circleci.com/pipelines/github/DataDog/dd-trace-rb/15605/workflows/5b32e4bb-155e-4a94-bf8b-980599eaafae/jobs/568892/tests#failed-test-0>

I strongly suspect the issue is that the profiler was able to "keep up"
with the Ruby VM and thus never needed to skip samples.

In fact, I can reproduce the same behavior by raising the
`dynamic_sampling_rate_overhead_target_percentage` on my machine.

Thus, to reduce flakiness, I'm lowering the target for the dynamic
sampling rate from 2% to 0.1% which should be tight enough to
consistently cause the profiler to need to skip samples in this test.
  • Loading branch information
ivoanjo committed Jul 24, 2024
1 parent 1e089bb commit 4d7cbce
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,7 @@
# But the total amount of allocations recorded should match the number we observed, and thus we record the
# remainder above the clamped value as a separate "Skipped Samples" step.
context 'with a high allocation rate' do
let(:options) { { **super(), dynamic_sampling_rate_overhead_target_percentage: 0.1 } }
let(:thread_that_allocates_as_fast_as_possible) { Thread.new { loop { BasicObject.new } } }

after do
Expand Down

0 comments on commit 4d7cbce

Please sign in to comment.