mirror of
https://github.com/chainreactors/spray.git
synced 2025-09-15 11:40:13 +00:00
优化pool.compare逻辑, 减少不必要的fuzzy compare
This commit is contained in:
parent
2c135f2b06
commit
4344da9007
@ -267,11 +267,14 @@ Loop:
|
||||
p.outputCh <- bl
|
||||
continue
|
||||
}
|
||||
|
||||
if base, ok := p.baselines[bl.Status]; ok && base.Compare(bl) == 1 {
|
||||
var status int
|
||||
base, ok := p.baselines[bl.Status]
|
||||
if ok {
|
||||
// 挑选对应状态码的baseline进行compare
|
||||
p.PutToInvalid(bl, "compare failed")
|
||||
continue
|
||||
if status = base.Compare(bl); status == 1 {
|
||||
p.PutToInvalid(bl, "compare failed")
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
bl.Collect()
|
||||
@ -282,7 +285,7 @@ Loop:
|
||||
}
|
||||
}
|
||||
|
||||
if base, ok := p.baselines[bl.Status]; ok && base.FuzzyCompare(bl) {
|
||||
if status == 0 && ok && base.FuzzyCompare(bl) {
|
||||
p.PutToInvalid(bl, "fuzzy compare failed")
|
||||
p.PutToFuzzy(bl)
|
||||
continue
|
||||
|
Loading…
x
Reference in New Issue
Block a user