(b *testing.B)
| 144 | } |
| 145 | |
| 146 | func 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 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…