function busy(n)
a = 0.0
for i = 1:n
a += sin(i)
a += cos(a)
end
a
end
import Profile
Profile.init(; n=5000, delay=0.001)
Profile.@profile busy(10^7)
Profile.fetch()
shows that the buffer got full during profiling.
Is there a way to run e.g. Profile.@profile busy(10^8)
but only until the profile buffer is full?