]> Cypherpunks repositories - gostls13.git/commit
runtime: improve runtime-internal mutex profile tests
authorRhys Hiltner <rhys.hiltner@gmail.com>
Thu, 16 May 2024 22:48:36 +0000 (15:48 -0700)
committerGopher Robot <gobot@golang.org>
Tue, 21 May 2024 17:18:14 +0000 (17:18 +0000)
commitf9ba2cff2286d378eca28c841bea8488c69fc30e
treed7a8c387e71ccba39beeb742edd8826dbe0b1eba
parent87e930f7289136fad1310d4b63dd4127e409bac5
runtime: improve runtime-internal mutex profile tests

Have the test use the same clock (cputicks) as the profiler, and use the
test's own measurements as hard bounds on the magnitude to expect in the
profile.

Compare the depiction of two users of the same lock: one where the
critical section is fast, one where it is slow. Confirm that the profile
shows the slow critical section as a large source of delay (with #66999
fixed), rather than showing the fast critical section as a large
recipient of delay.

For #64253
For #66999

Change-Id: I784c8beedc39de564dc8cee42060a5d5ce55de39
Reviewed-on: https://go-review.googlesource.com/c/go/+/586237
Auto-Submit: Rhys Hiltner <rhys.hiltner@gmail.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
src/runtime/export_test.go
src/runtime/metrics_test.go