Skip to content

Commit 985d916

Browse files
committed
runtime/metrics: add a note about floating-point values to package docs
This change adds a note to the package documentation that the package will never produce a NaN or infinity, to help ease usability. Change-Id: I72ff6ab636ca23722a68ef11e707c68b0724ac04 Reviewed-on: https://go-review.googlesource.com/c/go/+/275854 Run-TryBot: Michael Knyszek <[email protected]> Trust: Michael Knyszek <[email protected]> Reviewed-by: Michael Pratt <[email protected]>
1 parent e0d20e5 commit 985d916

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/runtime/metrics/doc.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ did also, and a new key should be introduced.
4242
For more details on the precise definition of the metric key's path and unit formats, see
4343
the documentation of the Name field of the Description struct.
4444
45+
A note about floats
46+
47+
This package supports metrics whose values have a floating-point representation. In
48+
order to improve ease-of-use, this package promises to never produce the following
49+
classes of floating-point values: NaN, infinity.
50+
4551
Supported metrics
4652
4753
Below is the full list of supported metrics, ordered lexicographically.

0 commit comments

Comments
 (0)