MCPcopy Create free account
hub / github.com/LagrangeDev/LagrangeGo / qualityTest

Function qualityTest

client/global.go:12–21  ·  view source on GitHub ↗
(addr string)

Source from the content-addressed store, hash-verified

10)
11
12func qualityTest(addr string) (int64, error) {
13 // see QualityTestManager
14 start := time.Now()
15 conn, err := net.DialTimeout("tcp", addr, time.Second*5)
16 if err != nil {
17 return 0, errors.Wrap(err, "failed to connect to server during quality test")
18 }
19 _ = conn.Close()
20 return time.Since(start).Milliseconds(), nil
21}

Callers 2

ConnectionQualityTestMethod · 0.85
initServersMethod · 0.85

Calls 1

CloseMethod · 0.45

Tested by

no test coverage detected