Skip to content

Commit

Permalink
adding comment for Clear function
Browse files Browse the repository at this point in the history
  • Loading branch information
aman-bansal committed Feb 1, 2021
1 parent 7a96256 commit 01a126e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions z/histogram.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ func (histogram *HistogramData) Percentile(p float64) float64 {
return histogram.Bounds[len(histogram.Bounds)-1]
}

// Clear reset the histogram. Helpful in situations where we need to reset the metrics
func (histogram *HistogramData) Clear() {
if histogram == nil {
return
Expand Down

0 comments on commit 01a126e

Please sign in to comment.