Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7500aa4

Browse files
fix(cli): calculate coder ping max correctly (#18734)
Embarassing mistake I made months ago 😦 *Doesn't effect schmoder, since we don't parse that max, it calculates it itself
1 parent6db6f48 commit7500aa4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

‎cli/ping.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func (s *pingSummary) addResult(r *ipnstate.PingResult) {
5353
ifs.Min==nil||r.LatencySeconds<s.Min.Seconds() {
5454
s.Min=ptr.Ref(time.Duration(r.LatencySeconds*float64(time.Second)))
5555
}
56-
ifs.Max==nil||r.LatencySeconds>s.Min.Seconds() {
56+
ifs.Max==nil||r.LatencySeconds>s.Max.Seconds() {
5757
s.Max=ptr.Ref(time.Duration(r.LatencySeconds*float64(time.Second)))
5858
}
5959
s.latencySum+=r.LatencySeconds

‎cli/ping_internal_test.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ func TestBuildSummary(t *testing.T) {
2121
},
2222
{
2323
Err:"",
24-
LatencySeconds:0.2,
24+
LatencySeconds:0.3,
2525
},
2626
{
2727
Err:"",
28-
LatencySeconds:0.3,
28+
LatencySeconds:0.2,
2929
},
3030
{
3131
Err:"ping error",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp