add benchmark filling a whole subnet

This commit is contained in:
Johannes Kimmel 2023-11-13 16:12:28 +01:00
parent ddc7bf5a05
commit 822a8039b1
1 changed files with 9 additions and 0 deletions

View File

@ -176,3 +176,12 @@ func TestInsert(t *testing.T) {
}
}
}
func BenchmarkFill(b *testing.B) {
root := &tree{prefix: netip.MustParsePrefix("0.0.0.0/20")}
for {
if alloc := root.Alloc(32); alloc == nil {
break
}
}
}