MCPcopy Create free account
hub / github.com/cockroachdb/swiss / benchmarkRuntimeMapPutGrow

Function benchmarkRuntimeMapPutGrow

bench_test.go:299–313  ·  view source on GitHub ↗
(
	b *testing.B, n int, genKeys func(start, end int) []T,
)

Source from the content-addressed store, hash-verified

297}
298
299func benchmarkRuntimeMapPutGrow[T benchTypes](
300 b *testing.B, n int, genKeys func(start, end int) []T,
301) {
302 c := perfbench.Open(b)
303
304 keys := genKeys(0, n)
305 b.ResetTimer()
306 c.Reset()
307 for i := 0; i < b.N; i++ {
308 m := make(map[T]T)
309 for _, k := range keys {
310 m[k] = k
311 }
312 }
313}
314
315func benchmarkSwissMapPutGrow[T benchTypes](b *testing.B, n int, genKeys func(start, end int) []T) {
316 c := perfbench.Open(b)

Callers

nothing calls this directly

Calls 1

genKeysFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…