MCPcopy
hub / github.com/cornelk/hashmap / BenchmarkReadGoSyncMapUint

Function BenchmarkReadGoSyncMapUint

benchmarks/benchmark_test.go:249–262  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

247}
248
249func BenchmarkReadGoSyncMapUint(b *testing.B) {
250 m := setupGoSyncMap(b)
251 b.ResetTimer()
252 b.RunParallel(func(pb *testing.PB) {
253 for pb.Next() {
254 for i := uintptr(0); i < benchmarkItemCount; i++ {
255 j, _ := m.Load(i)
256 if j != i {
257 b.Fail()
258 }
259 }
260 }
261 })
262}
263
264func BenchmarkReadGoSyncMapWithWritesUint(b *testing.B) {
265 m := setupGoSyncMap(b)

Callers

nothing calls this directly

Calls 2

setupGoSyncMapFunction · 0.85
NextMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…