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

Function BenchmarkReadHashMapString

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

Source from the content-addressed store, hash-verified

124}
125
126func BenchmarkReadHashMapString(b *testing.B) {
127 m, keys := setupHashMapString(b)
128 b.ResetTimer()
129
130 b.RunParallel(func(pb *testing.PB) {
131 for pb.Next() {
132 for i := 0; i < benchmarkItemCount; i++ {
133 s := keys[i]
134 sVal, _ := m.Get(s)
135 if sVal != s {
136 b.Fail()
137 }
138 }
139 }
140 })
141}
142
143func BenchmarkReadHaxMapUint(b *testing.B) {
144 m := setupHaxMap(b)

Callers

nothing calls this directly

Calls 3

setupHashMapStringFunction · 0.85
NextMethod · 0.80
GetMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…