Skip to content

Commit c2c110d

Browse files
authored
Merge pull request grpc#829 from menghanl/histogram_clear
Fix histogram clear()
2 parents edc5ccf + 2ac2b96 commit c2c110d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

benchmark/stats/histogram.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ func (h *Histogram) Clear() {
133133
h.SumOfSquares = 0
134134
h.Min = math.MaxInt64
135135
h.Max = math.MinInt64
136-
for _, v := range h.Buckets {
137-
v.Count = 0
136+
for i := range h.Buckets {
137+
h.Buckets[i].Count = 0
138138
}
139139
}
140140

0 commit comments

Comments
 (0)