Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
7
func
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
16
func
BenchmarkLast(b *testing.B) {
17
b.StopTimer()
Callers
nothing calls this directly
Calls
3
DocB
Function · 0.85
Find
Method · 0.80
First
Method · 0.80
Tested by
no test coverage detected