diff options
author | Michael Anthony Knyszek <mknyszek@google.com> | 2020-12-07 15:10:43 +0000 |
---|---|---|
committer | Michael Knyszek <mknyszek@google.com> | 2020-12-10 21:08:22 +0000 |
commit | 985d91666cebbd0aef36034cc28596da280ead37 (patch) | |
tree | b06788aee8fd94ce81ca6ce93ea3412ace10942d | |
parent | e0d20e52ee00fdf197f359d98526ff7ca0842e6b (diff) | |
download | go-985d91666cebbd0aef36034cc28596da280ead37.tar.gz go-985d91666cebbd0aef36034cc28596da280ead37.zip |
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 <mknyszek@google.com>
Trust: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
-rw-r--r-- | src/runtime/metrics/doc.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/runtime/metrics/doc.go b/src/runtime/metrics/doc.go index 05a887e4f4..a68184ee82 100644 --- a/src/runtime/metrics/doc.go +++ b/src/runtime/metrics/doc.go @@ -42,6 +42,12 @@ did also, and a new key should be introduced. For more details on the precise definition of the metric key's path and unit formats, see the documentation of the Name field of the Description struct. +A note about floats + +This package supports metrics whose values have a floating-point representation. In +order to improve ease-of-use, this package promises to never produce the following +classes of floating-point values: NaN, infinity. + Supported metrics Below is the full list of supported metrics, ordered lexicographically. |