mirror of
https://github.com/golang/go.git
synced 2024-09-21 10:28:27 +00:00
runtime/metrics: update documentation to current interface
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>
This commit is contained in:
parent
6530f2617f
commit
1004a7cb31
@ -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
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user