MCPcopy Create free account
hub / github.com/antchfx/htmlquery / BenchmarkSelectorCache

Function BenchmarkSelectorCache

query_test.go:49–54  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

47var testDoc = loadHTML(htmlSample)
48
49func BenchmarkSelectorCache(b *testing.B) {
50 DisableSelectorCache = false
51 for i := 0; i < b.N; i++ {
52 getQuery("/AAA/BBB/DDD/CCC/EEE/ancestor::*")
53 }
54}
55
56func BenchmarkDisableSelectorCache(b *testing.B) {
57 DisableSelectorCache = true

Callers

nothing calls this directly

Calls 1

getQueryFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…