MCPcopy Index your code
hub / github.com/TheAlgorithms/Go / BenchmarkAVLTree_Has

Function BenchmarkAVLTree_Has

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

Source from the content-addressed store, hash-verified

601}
602
603func BenchmarkAVLTree_Has(b *testing.B) {
604 helper := func() {
605 tree := bt.NewAVL[int]()
606 for i := 1; i <= testNum; i++ {
607 tree.Push(i)
608 }
609
610 for i := 1; i <= testNum; i++ {
611 tree.Has(i)
612 }
613 }
614
615 for i := 0; i < b.N; i++ {
616 helper()
617 }
618}
619
620func BenchmarkAVLTree_Delete(b *testing.B) {
621 helper := func() {

Callers

nothing calls this directly

Calls 2

PushMethod · 0.65
HasMethod · 0.65

Tested by

no test coverage detected