MCPcopy
hub / github.com/PuerkitoBio/goquery / BenchmarkIsSelection

Function BenchmarkIsSelection

bench_query_test.go:52–65  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

50}
51
52func BenchmarkIsSelection(b *testing.B) {
53 var y bool
54
55 b.StopTimer()
56 sel := DocW().Find("li")
57 sel2 := DocW().Find(".toclevel-2")
58 b.StartTimer()
59 for i := 0; i < b.N; i++ {
60 y = sel.IsSelection(sel2)
61 }
62 if !y {
63 b.Fatal("want true")
64 }
65}
66
67func BenchmarkIsNodes(b *testing.B) {
68 var y bool

Callers

nothing calls this directly

Calls 3

DocWFunction · 0.85
FindMethod · 0.80
IsSelectionMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…