fix: domain match

This commit is contained in:
mzz2017
2023-02-19 14:08:13 +08:00
parent 0d9892fff2
commit a011c2a74c
10 changed files with 411 additions and 63 deletions

View File

@ -172,7 +172,13 @@ func BenchmarkBruteforce(b *testing.B) {
if err != nil {
b.Fatal(err)
}
bf := NewBruteforce(simulatedDomainSet)
bf := NewBruteforce(consts.MaxMatchSetLen)
for _, domains := range simulatedDomainSet {
bf.AddSet(domains.RuleIndex, domains.Domains, domains.Key)
}
if err = bf.Build(); err != nil {
b.Fatal(err)
}
b.StartTimer()
runBenchmark(b, bf)
}