extract full matcher group

This commit is contained in:
Darien Raymond committed 2018-08-20 09:57:06 +02:00
1 parent 899b1399ee
commit 44c759eeab
5 files changed
+91 -9

No files matched your search

+13
View File
@@ -21,6 +21,19 @@ func BenchmarkDomainMatcherGroup(b *testing.B) {
}
}
func BenchmarkFullMatcherGroup(b *testing.B) {
g := new(FullMatcherGroup)
for i := 1; i <= 1024; i++ {
g.Add(strconv.Itoa(i)+".v2ray.com", uint32(i))
}
b.ResetTimer()
for i := 0; i < b.N; i++ {
_ = g.Match("0.v2ray.com")
}
}
func BenchmarkMarchGroup(b *testing.B) {
g := NewMatcherGroup()
for i := 1; i <= 1024; i++ {