From 394b85a04306206141f4dc175687ec370467c4d7 Mon Sep 17 00:00:00 2001 From: Ruslan Nigmatullin Date: Tue, 17 Dec 2024 10:57:34 -0800 Subject: [PATCH] fix test & use `/= 2` instead of bitshift --- processor/deltatocumulativeprocessor/internal/data/add.go | 4 ++-- .../deltatocumulativeprocessor/testdata/exponential/1.test | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/processor/deltatocumulativeprocessor/internal/data/add.go b/processor/deltatocumulativeprocessor/internal/data/add.go index 259ff701288a..d6b3ae6226bc 100644 --- a/processor/deltatocumulativeprocessor/internal/data/add.go +++ b/processor/deltatocumulativeprocessor/internal/data/add.go @@ -81,8 +81,8 @@ func getDeltaScale(arel, brel pmetric.ExponentialHistogramDataPointBuckets) expo var deltaScale expo.Scale for up-lo > maxBuckets { - lo >>= 1 - up >>= 1 + lo /= 2 + up /= 2 deltaScale++ } diff --git a/processor/deltatocumulativeprocessor/testdata/exponential/1.test b/processor/deltatocumulativeprocessor/testdata/exponential/1.test index 8aa87775ae80..4af8da850cfb 100644 --- a/processor/deltatocumulativeprocessor/testdata/exponential/1.test +++ b/processor/deltatocumulativeprocessor/testdata/exponential/1.test @@ -42,7 +42,7 @@ resourceMetrics: scale: 1 zeroCount: 0 positive: - bucketCounts: [0,0,0,0,0] + bucketCounts: [] -- out -- resourceMetrics: