File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ func (s *pingSummary) addResult(r *ipnstate.PingResult) {
53
53
if s .Min == nil || r .LatencySeconds < s .Min .Seconds () {
54
54
s .Min = ptr .Ref (time .Duration (r .LatencySeconds * float64 (time .Second )))
55
55
}
56
- if s .Max == nil || r .LatencySeconds > s .Min .Seconds () {
56
+ if s .Max == nil || r .LatencySeconds > s .Max .Seconds () {
57
57
s .Max = ptr .Ref (time .Duration (r .LatencySeconds * float64 (time .Second )))
58
58
}
59
59
s .latencySum += r .LatencySeconds
Original file line number Diff line number Diff line change @@ -21,11 +21,11 @@ func TestBuildSummary(t *testing.T) {
21
21
},
22
22
{
23
23
Err : "" ,
24
- LatencySeconds : 0.2 ,
24
+ LatencySeconds : 0.3 ,
25
25
},
26
26
{
27
27
Err : "" ,
28
- LatencySeconds : 0.3 ,
28
+ LatencySeconds : 0.2 ,
29
29
},
30
30
{
31
31
Err : "ping error" ,
You can’t perform that action at this time.
0 commit comments