MCPcopy Create free account
hub / github.com/PuerkitoBio/goquery / BenchmarkFirst

Function BenchmarkFirst

bench_array_test.go:7–14  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

5)
6
7func BenchmarkFirst(b *testing.B) {
8 b.StopTimer()
9 sel := DocB().Find("dd")
10 b.StartTimer()
11 for i := 0; i < b.N; i++ {
12 sel.First()
13 }
14}
15
16func BenchmarkLast(b *testing.B) {
17 b.StopTimer()

Callers

nothing calls this directly

Calls 3

DocBFunction · 0.85
FindMethod · 0.80
FirstMethod · 0.80

Tested by

no test coverage detected