This commit is contained in:
gobwas 2016-02-22 22:25:10 +03:00
parent 128b789a4d
commit ebd16e0441
1 changed files with 9 additions and 0 deletions

View File

@ -183,6 +183,15 @@ func BenchmarkAllGlobMismatch(b *testing.B) {
_ = m.Match(fixture_all_mismatch) _ = m.Match(fixture_all_mismatch)
} }
} }
func BenchmarkAllGlobMatchParallel(b *testing.B) {
m, _ := Compile(pattern_all)
b.RunParallel(func(pb *testing.PB) {
for pb.Next() {
_ = m.Match(fixture_all_match)
}
})
}
func BenchmarkAllRegexpMismatch(b *testing.B) { func BenchmarkAllRegexpMismatch(b *testing.B) {
m := regexp.MustCompile(regexp_all) m := regexp.MustCompile(regexp_all)
f := []byte(fixture_all_mismatch) f := []byte(fixture_all_mismatch)