MCPcopy Create free account
hub / github.com/chainreactors/spray / recordCheckStat

Method recordCheckStat

core/pool/checkpool.go:234–256  ·  view source on GitHub ↗
(bl *baseline.Baseline)

Source from the content-addressed store, hash-verified

232}
233
234func (pool *CheckPool) recordCheckStat(bl *baseline.Baseline) {
235 if pool.Statistor == nil || bl == nil || bl.SprayResult == nil {
236 return
237 }
238 if pool.Statistor.Counts == nil {
239 pool.Statistor.Counts = make(map[int]int)
240 }
241 if pool.Statistor.Sources == nil {
242 pool.Statistor.Sources = make(map[parsers.SpraySource]int)
243 }
244 if bl.Status != 0 {
245 pool.Statistor.Counts[bl.Status]++
246 }
247 if bl.Source.Name() != "" {
248 pool.Statistor.Sources[bl.Source]++
249 }
250 if bl.IsValid {
251 pool.Statistor.FoundNumber++
252 }
253 if bl.IsFuzzy {
254 pool.Statistor.FuzzyNumber++
255 }
256}
257
258func (pool *CheckPool) doRedirect(bl *baseline.Baseline, depth int) {
259 if depth >= pool.MaxRedirect {

Callers 1

HandlerMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected