Change under review
metrics: make request counter atomic
Contention simulator
Before m.requestCount++
β
After atomic.AddInt64
β
Press Run race to interleave the read-modify-writes. The expected total is
160.
The "before" lane models
load β add β store as three interleavable steps; the "after" lane treats each increment as one indivisible op. Re-run to sample different schedules.Review presets
metrics/counter.go
+4
β2