From 51937ce66005be7ff7651543a5e341e50f523405 Mon Sep 17 00:00:00 2001 From: Ian Butterworth Date: Sat, 22 Feb 2025 00:12:32 -0500 Subject: [PATCH] run rtds test up to 10x --- test/runtests.jl | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index 78fc612..3259a6b 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -463,20 +463,21 @@ end end Ts = subtypes(Any)[1:20] # we don't need all of them mappushes!(spell_spec, [], Ts) - while Profile.len_data() == 0 + rtds = [] + for _ in 1:10 # try to get a runtime dispatch on unfortunately flaky profiling @profile for i = 1:10000 mappushes!(spell_spec, [], Ts) end - end - _, sfdict = Profile.retrieve() - rtds = [] - for sfs in values(sfdict) - for sf in sfs - if (FlameGraphs.status(sf) & FlameGraphs.runtime_dispatch) != 0 - push!(rtds, sfs) - break + _, sfdict = Profile.retrieve() + for sfs in values(sfdict) + for sf in sfs + if (FlameGraphs.status(sf) & FlameGraphs.runtime_dispatch) != 0 + push!(rtds, sfs) + break + end end end + isempty(rtds) || break end @test !isempty(rtds) end