(b *testing.B)
| 167 | } |
| 168 | |
| 169 | func 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 | |
| 177 | func BenchmarkRegexp_MatchString_VS_FindSubString1(b *testing.B) { |
| 178 | var r = re.MustCompile("(?i)(chrome)") |
nothing calls this directly
no test coverage detected