]> Cypherpunks repositories - gostls13.git/commit
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>
Wed, 6 Sep 2023 15:44:45 +0000 (15:44 +0000)
commit2186909d8651728cb71a4e02e0fe7b2c3d55e9b4
tree4e30118543ebfacca32aa528db5b0ed9b76767bd
parent4c5130a96eabd5d9a72a43aa8e895b668fbd653b
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.

Fixes #62477.

Change-Id: I67497347d50ed5c3ce1719a18714c062ec938cab
Reviewed-on: https://go-review.googlesource.com/c/go/+/525595
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Felix Geisendörfer <felix.geisendoerfer@datadoghq.com>
src/runtime/metrics.go
src/runtime/metrics_test.go