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

Function BenchmarkRuneMap_Lookup

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

Source from the content-addressed store, hash-verified

31}
32
33func BenchmarkRuneMap_Lookup(b *testing.B) {
34 var tree = re.NewRuneTree([]string{"abc", "abd", "def", "ghi", "中国"})
35 for i := 0; i < b.N; i++ {
36 tree.Lookup("我来自中国", true)
37 }
38}
39
40func BenchmarkRuneMap_Lookup2_NOT_FOUND(b *testing.B) {
41 var tree = re.NewRuneTree([]string{"abc", "abd", "cde", "GHI"})

Callers

nothing calls this directly

Calls 2

NewRuneTreeFunction · 0.92
LookupMethod · 0.80

Tested by

no test coverage detected