Skip to content

Commit

Permalink
Merge pull request #77 from VictoriaMetrics/fixed-histogram-merge
Browse files Browse the repository at this point in the history
fixed histogram merge
  • Loading branch information
f41gh7 authored Jul 10, 2024
2 parents d5fb341 + 001417b commit 32321d6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion histogram.go
Original file line number Diff line number Diff line change
Expand Up @@ -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]
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion histogram_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 32321d6

Please sign in to comment.