MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / BenchmarkRuneMap_Lookup2_NOT_FOUND

Function BenchmarkRuneMap_Lookup2_NOT_FOUND

internal/re/rune_tree_test.go:40–45  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

38}
39
40func BenchmarkRuneMap_Lookup2_NOT_FOUND(b *testing.B) {
41 var tree = re.NewRuneTree([]string{"abc", "abd", "cde", "GHI"})
42 for i := 0; i < b.N; i++ {
43 tree.Lookup("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36", true)
44 }
45}
46
47func BenchmarkRune_Regexp_FOUND(b *testing.B) {
48 var reg = regexp.MustCompile("(?i)abc|abd|cde|GHI")

Callers

nothing calls this directly

Calls 2

NewRuneTreeFunction · 0.92
LookupMethod · 0.80

Tested by

no test coverage detected