For PProf.Allocs, change the default metric to allocs
, not size
.
#55
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.
We default to allocs, since julia's Profile.Allocs code currently
uniformly samples accross allocations, so allocs is a representative
profile, while size is not.
Explanation:
If each allocation was uniform (as in the case of the allocs sample
type), then uniformly sampling should give an accurate distribution of
where the allocations occur: code that allocates more often is more
likely to show up in the profile.
But if the metric we're interested in is not uniform: how many bytes are
allocated, uniform sampling will not get us a representative
distribution of where the bytes are allocated! Code that allocates very
large objects is no more or less likely to be included than code that
allocates very small ones.