add benchmark filling a whole subnet
This commit is contained in:
parent
ddc7bf5a05
commit
822a8039b1
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue