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

Function BenchmarkRegexp_MatchString_CaseSensitive2

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

Source from the content-addressed store, hash-verified

167}
168
169func BenchmarkRegexp_MatchString_CaseSensitive2(b *testing.B) {
170 var r = regexp.MustCompile("(abc|def|ghi)")
171 b.ResetTimer()
172 for i := 0; i < b.N; i++ {
173 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")
174 }
175}
176
177func BenchmarkRegexp_MatchString_VS_FindSubString1(b *testing.B) {
178 var r = re.MustCompile("(?i)(chrome)")

Callers

nothing calls this directly

Calls 1

MatchStringMethod · 0.80

Tested by

no test coverage detected