Files
fn-serverless/vendor/github.com/asaskevich/govalidator/utils_benchmark_test.go
Reed Allman 8af605cf3d update thrift, opencensus, others (#893)
* update thrift, opencensus, others

* stats: update to opencensus 0.6.0 view api
2018-03-26 15:43:49 -07:00

18 lines
353 B
Go

package govalidator
import "testing"
func BenchmarkContains(b *testing.B) {
b.ResetTimer()
for n := 0; n < b.N; n++ {
Contains("a0b01c012deffghijklmnopqrstu0123456vwxyz", "0123456789")
}
}
func BenchmarkMatches(b *testing.B) {
b.ResetTimer()
for n := 0; n < b.N; n++ {
Matches("alfkjl12309fdjldfsa209jlksdfjLAKJjs9uJH234", "[\\w\\d]+")
}
}