(b *testing.B)
| 587 | } |
| 588 | |
| 589 | func BenchmarkAVLTree_Insert(b *testing.B) { |
| 590 | helper := func() { |
| 591 | tree := bt.NewAVL[int]() |
| 592 | for i := 1; i <= testNum; i++ { |
| 593 | tree.Push(i) |
| 594 | } |
| 595 | } |
| 596 | |
| 597 | for i := 0; i < b.N; i++ { |
| 598 | helper() |
| 599 | } |
| 600 | |
| 601 | } |
| 602 | |
| 603 | func BenchmarkAVLTree_Has(b *testing.B) { |
| 604 | helper := func() { |