]> Cypherpunks.ru repositories - gostls13.git/commit
internal/godebug: export non-default-behavior counters in runtime/metrics
authorRuss Cox <rsc@golang.org>
Mon, 28 Nov 2022 18:59:49 +0000 (13:59 -0500)
committerGopher Robot <gobot@golang.org>
Thu, 19 Jan 2023 22:26:43 +0000 (22:26 +0000)
commit213495a4a67c318a1fab6e76093e6690c2141c0e
treed0b1256e72ff7256143377d1f17f64f5e5e0c2a6
parentaa51c40b1cc62d53603d7b7aea3232969aa40afe
internal/godebug: export non-default-behavior counters in runtime/metrics

Allow GODEBUG users to report how many times a setting
resulted in non-default behavior.

Record non-default-behaviors for all existing GODEBUGs.

Also rework tests to ensure that runtime is in sync with runtime/metrics.All,
and generate docs mechanically from metrics.All.

For #56986.

Change-Id: Iefa1213e2a5c3f19ea16cd53298c487952ef05a4
Reviewed-on: https://go-review.googlesource.com/c/go/+/453618
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
20 files changed:
src/archive/tar/reader.go
src/archive/zip/reader.go
src/crypto/x509/root.go
src/crypto/x509/x509.go
src/go/build/build.go
src/internal/godebug/godebug.go
src/internal/godebug/godebug_test.go
src/math/rand/rand.go
src/net/http/server.go
src/net/http/transport.go
src/os/exec/lp_plan9.go
src/os/exec/lp_unix.go
src/os/exec/lp_windows.go
src/runtime/metrics.go
src/runtime/metrics/description.go
src/runtime/metrics/description_test.go
src/runtime/metrics/doc.go
src/runtime/panic.go
src/runtime/panicnil_test.go
src/runtime/runtime.go