2017-08-13 07:28:43 +02:00
|
|
|
package goparsify
|
|
|
|
|
|
|
|
import "testing"
|
|
|
|
|
|
|
|
func BenchmarkAny(b *testing.B) {
|
|
|
|
p := Any("hello", "goodbye", "help")
|
|
|
|
|
2017-08-13 08:56:12 +02:00
|
|
|
b.ResetTimer()
|
2017-08-13 07:28:43 +02:00
|
|
|
for i := 0; i < b.N; i++ {
|
|
|
|
_, _ = Run(p, "hello")
|
|
|
|
_, _ = Run(p, "hello world")
|
|
|
|
_, _ = Run(p, "good boy")
|
|
|
|
_, _ = Run(p, "help me")
|
|
|
|
}
|
|
|
|
}
|