]> Cypherpunks repositories - gostls13.git/commit
runtime: add direct benchmark of mutex contention
authorRhys Hiltner <rhys.hiltner@gmail.com>
Fri, 2 Aug 2024 22:31:22 +0000 (15:31 -0700)
committerGopher Robot <gobot@golang.org>
Fri, 9 Aug 2024 21:17:37 +0000 (21:17 +0000)
commitc8ccbcdde595bd04056398bec72532a8582f7442
treef5385b5e51c5eda36d0be135d8941dc3bf15648d
parent820d4458768ccc886b09fa258d7faae4260a0772
runtime: add direct benchmark of mutex contention

Measure throughput of a single mutex with all threads contending. Do not
attempt to measure fairness/starvation.

The ChanContended benchmark works somewhat well for this (interacting
with the mutex is a large contributor to its results), but it's better
to be clear about what we're attempting to measure.

For #68578

Change-Id: Ie397b4c363bfcd5afddf796a81cd6c34ebf8551b
Reviewed-on: https://go-review.googlesource.com/c/go/+/604375
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Auto-Submit: Rhys Hiltner <rhys.hiltner@gmail.com>
src/runtime/runtime_test.go