]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.21] runtime/metrics: fix /gc/scan/* metrics
authorNayef Ghattas <nayef.ghattas@datadoghq.com>
Tue, 5 Sep 2023 12:00:17 +0000 (14:00 +0200)
committerGopher Robot <gobot@golang.org>
Mon, 11 Sep 2023 20:06:42 +0000 (20:06 +0000)
commitcd66ca0636a55d301530c0d766a47f07c5423d0d
tree919252a92d041a93e0497b996c97e3d96fb6a063
parentd7a062680676c00adce792f72b4370462a9886c3
[release-branch.go1.21] runtime/metrics: fix /gc/scan/* metrics

In the existing implementation, all /gc/scan/* metrics are
always equal to 0 due to the dependency on gcStatDep not being
set. This leads to gcStatAggregate always containing zeros, and
always reporting 0 for those metrics.

Also, add a test to ensure that /gc/scan/* metrics are not empty.

For #62477.
Fixes #62478.

Change-Id: I67497347d50ed5c3ce1719a18714c062ec938cab
Reviewed-on: https://go-review.googlesource.com/c/go/+/526116
Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Heschi Kreinick <heschi@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/runtime/metrics.go
src/runtime/metrics_test.go