Skip to content

Commit

Permalink
add comment for getDeltaScale
Browse files Browse the repository at this point in the history
  • Loading branch information
euroelessar committed Dec 17, 2024
1 parent 8f73157 commit c890b96
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions processor/deltatocumulativeprocessor/internal/data/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ func (dp Histogram) Add(in Histogram) Histogram {
return dp
}

// getDeltaScale computes how many times the histograms need to be downscaled to ensure
// the bucket range after thei merge fits within maxBuckets.
// This logic assumes that trailing and leading zeros are going to be removed.
func getDeltaScale(arel, brel pmetric.ExponentialHistogramDataPointBuckets) expo.Scale {
a, b := expo.Abs(arel), expo.Abs(brel)

Expand Down

0 comments on commit c890b96

Please sign in to comment.