mirror of
https://github.com/miekg/dns.git
synced 2026-05-05 14:46:11 +02:00
add benchmarking
This commit is contained in:
parent
e15a4b1508
commit
76db7d1a62
@ -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")
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user