MCPcopy
hub / github.com/XIU2/CloudflareSpeedTest / Less

Method Less

utils/csv.go:143–149  ·  view source on GitHub ↗
(i, j int)

Source from the content-addressed store, hash-verified

141 return len(s)
142}
143func (s PingDelaySet) Less(i, j int) bool {
144 iRate, jRate := s[i].getLossRate(), s[j].getLossRate()
145 if iRate != jRate {
146 return iRate < jRate
147 }
148 return s[i].Delay < s[j].Delay
149}
150func (s PingDelaySet) Swap(i, j int) {
151 s[i], s[j] = s[j], s[i]
152}

Callers

nothing calls this directly

Calls 1

getLossRateMethod · 0.80

Tested by

no test coverage detected