MCPcopy Create free account
hub / github.com/TheAlgorithms/Go / BenchmarkAVLTree_Insert

Function BenchmarkAVLTree_Insert

structure/tree/tree_test.go:589–601  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

587}
588
589func 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
603func BenchmarkAVLTree_Has(b *testing.B) {
604 helper := func() {

Callers

nothing calls this directly

Calls 1

PushMethod · 0.65

Tested by

no test coverage detected