(b *testing.B, max, terms int)
| 402 | } |
| 403 | |
| 404 | func generateRandomBitmap(b *testing.B, max, terms int) []byte { |
| 405 | bitmap := NewBitmap() |
| 406 | for i := 0; i < terms; i++ { |
| 407 | bitmap.Add(uint32(rand.Intn(max))) |
| 408 | } |
| 409 | result, err := bitmap.ToBytes() |
| 410 | require.NoError(b, err) |
| 411 | return result |
| 412 | } |
| 413 | |
| 414 | func BenchmarkChecksum(b *testing.B) { |
| 415 | for terms := 1; terms <= (1 << 20); terms *= 2 { |
no test coverage detected
searching dependent graphs…