Skip to content

Commit

Permalink
Add note about removing bytes profile labels.
Browse files Browse the repository at this point in the history
  • Loading branch information
cyriltovena committed Jul 29, 2022
1 parent 0825e3a commit d39f022
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/pprof/pprof.go
Expand Up @@ -68,7 +68,10 @@ func (s *sortedSample) Swap(i, j int) {
// Normalize normalizes the profile by:
// - Removing all duplicate samples (summing their values).
// - Removing redundant profile labels (byte => unique of an allocation site)
// todo: We should reassess if this was a good choice because by merging duplicate stacktrace samples
// we cannot recompute the allocation per site ("bytes") profile label.
// - Removing empty samples.
// - Then remove unused references.
func (p *Profile) Normalize() {
// first we sort the samples location ids.
hashes := p.hasher.hashes(p.Sample)
Expand Down

0 comments on commit d39f022

Please sign in to comment.