File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -170,7 +170,7 @@ type HistogramOpts struct {
170
170
// All observations with an absolute value of less or equal
171
171
// SparseBucketsZeroThreshold are accumulated into a “zero” bucket. For
172
172
// best results, this should be close to a bucket boundary. This is
173
- // moste easily accomplished by picking a power of ten. If
173
+ // most easily accomplished by picking a power of ten. If
174
174
// SparseBucketsZeroThreshold is left at zero (or set to a negative
175
175
// value), DefSparseBucketsZeroThreshold is used as the threshold.
176
176
SparseBucketsZeroThreshold float64
@@ -536,6 +536,7 @@ func (h *histogram) observe(v float64, bucket int) {
536
536
// calculated as -0.9999999999999999 rather than -1 and thus
537
537
// yields a key unexpectedly one off. Maybe special-case precise
538
538
// powers of 10.
539
+ // TODO(beorn7): This needs special-casing for ±Inf and NaN.
539
540
sparseKey = int (math .Ceil (math .Log10 (math .Abs (v )) * float64 (h .sparseResolution )))
540
541
}
541
542
// We increment h.countAndHotIdx so that the counter in the lower
You can’t perform that action at this time.
0 commit comments