From 08104a0ef98e85cd6090eb035d63504ad9ae0ef9 Mon Sep 17 00:00:00 2001 From: beorn7 Date: Fri, 29 Jan 2021 22:24:27 +0100 Subject: [PATCH] Minor doc comment fixes Signed-off-by: beorn7 --- prometheus/histogram.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/prometheus/histogram.go b/prometheus/histogram.go index d73b28e..c199c5d 100644 --- a/prometheus/histogram.go +++ b/prometheus/histogram.go @@ -170,7 +170,7 @@ type HistogramOpts struct { // All observations with an absolute value of less or equal // SparseBucketsZeroThreshold are accumulated into a “zero” bucket. For // best results, this should be close to a bucket boundary. This is - // moste easily accomplished by picking a power of ten. If + // most easily accomplished by picking a power of ten. If // SparseBucketsZeroThreshold is left at zero (or set to a negative // value), DefSparseBucketsZeroThreshold is used as the threshold. SparseBucketsZeroThreshold float64 @@ -536,6 +536,7 @@ func (h *histogram) observe(v float64, bucket int) { // calculated as -0.9999999999999999 rather than -1 and thus // yields a key unexpectedly one off. Maybe special-case precise // powers of 10. + // TODO(beorn7): This needs special-casing for ±Inf and NaN. sparseKey = int(math.Ceil(math.Log10(math.Abs(v)) * float64(h.sparseResolution))) } // We increment h.countAndHotIdx so that the counter in the lower