histograms: fixed panic in merge when target bucket is nil
This commit is contained in:
parent
a52bdc6f15
commit
5e5f209f79
@ -125,6 +125,10 @@ func (h *Histogram) Merge(b *Histogram) {
|
||||
if db == nil {
|
||||
continue
|
||||
}
|
||||
if h.decimalBuckets[i] == nil {
|
||||
var b [bucketsPerDecimal]uint64
|
||||
h.decimalBuckets[i] = &b
|
||||
}
|
||||
for j := range db {
|
||||
h.decimalBuckets[i][j] = db[j]
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user