MCPcopy Index your code
hub / github.com/GoEdgeLab/EdgeNode / BenchmarkRegexp_MatchString_CaseSensitive

Function BenchmarkRegexp_MatchString_CaseSensitive

internal/re/regexp_test.go:160–167  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

158}
159
160func BenchmarkRegexp_MatchString_CaseSensitive(b *testing.B) {
161 var r = re.MustCompile("(abc|def|ghi)")
162 b.Log("keywords:", r.Keywords())
163 b.ResetTimer()
164 for i := 0; i < b.N; i++ {
165 r.MatchString("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")
166 }
167}
168
169func BenchmarkRegexp_MatchString_CaseSensitive2(b *testing.B) {
170 var r = regexp.MustCompile("(abc|def|ghi)")

Callers

nothing calls this directly

Calls 4

MustCompileFunction · 0.92
LogMethod · 0.80
KeywordsMethod · 0.80
MatchStringMethod · 0.80

Tested by

no test coverage detected