add benchmarking

This commit is contained in:
Miek Gieben 2013-06-22 09:40:00 +01:00
parent e15a4b1508
commit 76db7d1a62

View File

@ -98,3 +98,11 @@ func BenchmarkCompareLabels(b *testing.B) {
CompareDomainName("www.example.com", "aa.example.com")
}
}
func BenchmarkIsSubDomain(b *testing.B) {
for i := 0; i < b.N; i++ {
IsSubDomain("www.example.com", "aa.example.com")
IsSubDomain("example.com", "aa.example.com")
IsSubDomain("miek.nl", "aa.example.com")
}
}