diff options
| author | cui fliter <imcusg@gmail.com> | 2023-11-07 17:35:46 +0800 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2023-11-08 16:59:11 +0000 |
| commit | 6a1bbca2b3129b18f7d7e63b51536da2e9afe9e2 (patch) | |
| tree | e7a99852f607ed39fa16619d28633f5a089a9526 /src/runtime/metrics | |
| parent | fa903593fb7c40a5745817b68d9a71ab6b934009 (diff) | |
| download | go-6a1bbca2b3129b18f7d7e63b51536da2e9afe9e2.tar.xz | |
runtime: add available godoc link
Change-Id: Ifb4844efddcb0369b0302eeab72394eeaf5c8072
Reviewed-on: https://go-review.googlesource.com/c/go/+/540022
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: shuang cui <imcusg@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/runtime/metrics')
| -rw-r--r-- | src/runtime/metrics/doc.go | 2 | ||||
| -rw-r--r-- | src/runtime/metrics/sample.go | 6 | ||||
| -rw-r--r-- | src/runtime/metrics/value.go | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/runtime/metrics/doc.go b/src/runtime/metrics/doc.go index 8d79df622d..5895404217 100644 --- a/src/runtime/metrics/doc.go +++ b/src/runtime/metrics/doc.go @@ -18,7 +18,7 @@ metric sets may not intersect. 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 +Descriptions returned by [All]. Each [Description] also includes useful information about the metric. Thus, users of this API are encouraged to sample supported metrics defined by the diff --git a/src/runtime/metrics/sample.go b/src/runtime/metrics/sample.go index 4cf8cdf799..9efc5c5f06 100644 --- a/src/runtime/metrics/sample.go +++ b/src/runtime/metrics/sample.go @@ -24,7 +24,7 @@ type Sample struct { // Implemented in the runtime. func runtime_readMetrics(unsafe.Pointer, int, int) -// Read populates each Value field in the given slice of metric samples. +// Read populates each [Value] field in the given slice of metric samples. // // Desired metrics should be present in the slice with the appropriate name. // The user of this API is encouraged to re-use the same slice between calls for @@ -32,7 +32,7 @@ func runtime_readMetrics(unsafe.Pointer, int, int) // // Note that re-use has some caveats. Notably, Values should not be read or // manipulated while a Read with that value is outstanding; that is a data race. -// This property includes pointer-typed Values (for example, Float64Histogram) +// This property includes pointer-typed Values (for example, [Float64Histogram]) // whose underlying storage will be reused by Read when possible. To safely use // such values in a concurrent setting, all data must be deep-copied. // @@ -40,7 +40,7 @@ func runtime_readMetrics(unsafe.Pointer, int, int) // must share no underlying memory. When in doubt, create a new []Sample from // scratch, which is always safe, though may be inefficient. // -// Sample values with names not appearing in All will have their Value populated +// Sample values with names not appearing in [All] will have their Value populated // as KindBad to indicate that the name is unknown. func Read(m []Sample) { runtime_readMetrics(unsafe.Pointer(&m[0]), len(m), cap(m)) diff --git a/src/runtime/metrics/value.go b/src/runtime/metrics/value.go index ed9a33d87c..3059749f1a 100644 --- a/src/runtime/metrics/value.go +++ b/src/runtime/metrics/value.go @@ -9,7 +9,7 @@ import ( "unsafe" ) -// ValueKind is a tag for a metric Value which indicates its type. +// ValueKind is a tag for a metric [Value] which indicates its type. type ValueKind int const ( |
