fix: process location is so noisy

This commit is contained in:
n3t1zen
2026-02-24 22:43:23 +08:00
parent 03eb444cdd
commit 72956fb4f4
4 changed files with 66 additions and 38 deletions

View File

@@ -399,17 +399,18 @@ func (g *URLTestGroup) urlTest(ctx context.Context, force bool) (map[string]uint
g.logger.Debug("outbound ", tag, " unavailable: ", err)
g.history.DeleteURLTestHistory(realTag)
} else {
g.logger.Debug("outbound ", tag, " available: ", t, "ms")
add_latency, exist := g.costs[tag]
if !exist {
add_latency = 0
}
t = t + add_latency
g.logger.Debug("outbound ", tag, " available: ", t, "ms (add latency: ", add_latency, "ms)")
g.history.StoreURLTestHistory(realTag, &adapter.URLTestHistory{
Time: time.Now(),
Delay: t,
})
resultAccess.Lock()
add_latency, exist := g.costs[tag]
if !exist {
add_latency = 0
}
result[tag] = t + add_latency
result[tag] = t
resultAccess.Unlock()
}
return nil, nil