]> Cypherpunks repositories - gostls13.git/commit
runtime: verify attribution of mutex delay
authorRhys Hiltner <rhys.hiltner@gmail.com>
Thu, 16 May 2024 22:48:36 +0000 (15:48 -0700)
committerGopher Robot <gobot@golang.org>
Wed, 7 May 2025 19:22:19 +0000 (12:22 -0700)
commit591c4b50c0d8c61087c30261efd5e97668625e06
tree015f4eec7e2ecd267a6e1cc750950db3e0c87a64
parent4d0f955a5e2a7c3310f15983b643ff5bf5fc1351
runtime: verify attribution of mutex delay

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.

Previously reviewed as https://go.dev/cl/586237.

For #66999

Change-Id: Ic2d78cc29153d5322577d84abdc448e95ed8f594
Reviewed-on: https://go-review.googlesource.com/c/go/+/667616
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: Rhys Hiltner <rhys.hiltner@gmail.com>
src/runtime/export_test.go
src/runtime/metrics_test.go