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

Function BenchmarkMapGetHit

bench_test.go:35–46  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

33}
34
35func BenchmarkMapGetHit(b *testing.B) {
36 b.Run("impl=runtimeMap", func(b *testing.B) {
37 b.Run("t=Int64", benchSizes(benchmarkRuntimeMapGetHit[int64], genKeys[int64]))
38 b.Run("t=Int32", benchSizes(benchmarkRuntimeMapGetHit[int32], genKeys[int32]))
39 b.Run("t=String", benchSizes(benchmarkRuntimeMapGetHit[string], genKeys[string]))
40 })
41 b.Run("impl=swissMap", func(b *testing.B) {
42 b.Run("t=Int64", benchSizes(benchmarkSwissMapGetHit[int64], genKeys[int64]))
43 b.Run("t=Int32", benchSizes(benchmarkSwissMapGetHit[int32], genKeys[int32]))
44 b.Run("t=String", benchSizes(benchmarkSwissMapGetHit[string], genKeys[string]))
45 })
46}
47
48func BenchmarkMapGetMiss(b *testing.B) {
49 b.Run("impl=runtimeMap", func(b *testing.B) {

Callers

nothing calls this directly

Calls 1

benchSizesFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…