Skip to content

Commit 08104a0

Browse files
committed
Minor doc comment fixes
Signed-off-by: beorn7 <[email protected]>
1 parent a9d0066 commit 08104a0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

prometheus/histogram.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ type HistogramOpts struct {
170170
// All observations with an absolute value of less or equal
171171
// SparseBucketsZeroThreshold are accumulated into a “zero” bucket. For
172172
// 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
174174
// SparseBucketsZeroThreshold is left at zero (or set to a negative
175175
// value), DefSparseBucketsZeroThreshold is used as the threshold.
176176
SparseBucketsZeroThreshold float64
@@ -536,6 +536,7 @@ func (h *histogram) observe(v float64, bucket int) {
536536
// calculated as -0.9999999999999999 rather than -1 and thus
537537
// yields a key unexpectedly one off. Maybe special-case precise
538538
// powers of 10.
539+
// TODO(beorn7): This needs special-casing for ±Inf and NaN.
539540
sparseKey = int(math.Ceil(math.Log10(math.Abs(v)) * float64(h.sparseResolution)))
540541
}
541542
// We increment h.countAndHotIdx so that the counter in the lower

0 commit comments

Comments
 (0)