]> Cypherpunks.ru repositories - gostls13.git/commitdiff
runtime/metrics: update documentation to current interface
authorBranden J Brown <zephyrtronium@gmail.com>
Tue, 16 Feb 2021 04:12:15 +0000 (23:12 -0500)
committerMichael Knyszek <mknyszek@google.com>
Tue, 16 Feb 2021 16:26:30 +0000 (16:26 +0000)
The package documentation referenced sample metadata that was removed in CL 282632. Update this documentation to be less specific
about what metadata is available.

Additionally, the documentation on the Sample type referred to Descriptions instead of All as the source of metrics names.

Fixes #44280.

Change-Id: I24fc63a744bf498cb4cd5bda56c1599f6dd75929
Reviewed-on: https://go-review.googlesource.com/c/go/+/292309
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Trust: Michael Knyszek <mknyszek@google.com>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Go Bot <gobot@golang.org>

src/runtime/metrics/doc.go
src/runtime/metrics/sample.go

index 5da050f973bd0569b7d58792319b6baca55d704c..7f790afc12eeabcdda78f0d01a0d83003155d18a 100644 (file)
@@ -16,9 +16,7 @@ Interface
 Metrics are designated by a string key, rather than, for example, a field name in
 a struct. The full list of supported metrics is always available in the slice of
 Descriptions returned by All. Each Description also includes useful information
-about the metric, such as how to display it (for example, gauge vs. counter)
-and how difficult or disruptive it is to obtain it (for example, do you need to
-stop the world?).
+about the metric.
 
 Thus, users of this API are encouraged to sample supported metrics defined by the
 slice returned by All to remain compatible across Go versions. Of course, situations
index b3933e266ed254a95ca2c4a2781ec07976fb2e45..4cf8cdf79942820e6f0acf6b20adc71144fcd95a 100644 (file)
@@ -14,7 +14,7 @@ type Sample struct {
        // Name is the name of the metric sampled.
        //
        // It must correspond to a name in one of the metric descriptions
-       // returned by Descriptions.
+       // returned by All.
        Name string
 
        // Value is the value of the metric sample.