Merge pull request #77 from VictoriaMetrics/fixed-histogram-merge

fixed histogram merge
This commit is contained in:
Nikolay 2024-07-10 12:44:08 +02:00 committed by GitHub
commit 32321d68e1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -130,7 +130,7 @@ func (h *Histogram) Merge(b *Histogram) {
h.decimalBuckets[i] = &b
}
for j := range db {
h.decimalBuckets[i][j] = db[j]
h.decimalBuckets[i][j] += db[j]
}
}
}

View File

@ -20,7 +20,7 @@ func TestHistogramMerge(t *testing.T) {
b := NewHistogram("test")
for i := 98; i < 218; i++ {
h.Update(float64(i))
b.Update(float64(i))
}
h.Merge(b)