(b *testing.B)
| 177 | } |
| 178 | |
| 179 | func BenchmarkCounter_GC(b *testing.B) { |
| 180 | runtime.GOMAXPROCS(4) |
| 181 | |
| 182 | var counter = counters.NewCounter[uint32]() |
| 183 | |
| 184 | for i := uint64(0); i < 1e5; i++ { |
| 185 | counter.IncreaseKey(types.String(i), 20) |
| 186 | } |
| 187 | |
| 188 | b.ResetTimer() |
| 189 | |
| 190 | b.RunParallel(func(pb *testing.PB) { |
| 191 | for pb.Next() { |
| 192 | counter.GC() |
| 193 | } |
| 194 | }) |
| 195 | |
| 196 | //b.Log(counter.TotalItems()) |
| 197 | } |
nothing calls this directly
no test coverage detected