MCPcopy Create free account
hub / github.com/oschwald/maxminddb-golang / BenchmarkStringCacheCold

Function BenchmarkStringCacheCold

internal/decoder/string_cache_test.go:146–161  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

144}
145
146func BenchmarkStringCacheCold(b *testing.B) {
147 cache := newStringCache()
148 data := make([]byte, 8192)
149 for i := range data {
150 data[i] = 'a' + byte(i%26)
151 }
152
153 var offset uint
154 for b.Loop() {
155 benchmarkStringCacheSink = cache.internAt(offset, 5, data)
156 offset += 7
157 if offset+5 >= uint(len(data)) {
158 offset = 0
159 }
160 }
161}

Callers

nothing calls this directly

Calls 2

newStringCacheFunction · 0.85
internAtMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…