Skip to content

Commit fe1e1c4

Browse files
authored
Update Allocs.jl (#49169)
For most applications the sample rate of 1/1000 is way too low. This will require manually setting a rate for production use, but IMO it's a lot better to make the default be taylored towards interactive/beginner use rather than deployment.
1 parent ceafd6c commit fe1e1c4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdlib/Profile/src/Allocs.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ struct RawResults
3030
end
3131

3232
"""
33-
Profile.Allocs.@profile [sample_rate=0.0001] expr
33+
Profile.Allocs.@profile [sample_rate=0.1] expr
3434
3535
Profile allocations that happen during `expr`, returning
3636
both the result and and AllocResults struct.
@@ -67,7 +67,7 @@ macro profile(opts, ex)
6767
_prof_expr(ex, opts)
6868
end
6969
macro profile(ex)
70-
_prof_expr(ex, :(sample_rate=0.0001))
70+
_prof_expr(ex, :(sample_rate=0.1))
7171
end
7272

7373
function _prof_expr(expr, opts)

0 commit comments

Comments
 (0)