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
This repository was archived by the owner on Aug 30, 2024. It is now read-only.
/coder-v1-cliPublic archive

feat: Add Ping command to monitor workspace latency#409

Merged
kylecarbs merged 15 commits intomasterfromping
Aug 9, 2021
Merged

Conversation

kylecarbs
Copy link
Member

@kylecarbskylecarbs commentedAug 9, 2021
edited
Loading

[ch13708]

asciicast

@kylecarbskylecarbs requested a review fromf0sselAugust 9, 2021 04:02
return err
}

fmt.Printf("%.2fms (%s) seq=%d\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

not needed for an MVP, of course, but would be nice if this printed stats when the user quit, like the actual ping command:

$ ping -c 3 google.comPING google.com(sfo03s24-in-x0e.1e100.net (2607:f8b0:4005:80c::200e)) 56 data bytes64 bytes from sfo03s24-in-x0e.1e100.net (2607:f8b0:4005:80c::200e): icmp_seq=1 ttl=118 time=10.8 ms64 bytes from sfo03s24-in-x0e.1e100.net (2607:f8b0:4005:80c::200e): icmp_seq=2 ttl=118 time=10.3 ms64 bytes from sfo03s24-in-x0e.1e100.net (2607:f8b0:4005:80c::200e): icmp_seq=3 ttl=118 time=11.2 ms--- google.com ping statistics ---3 packets transmitted, 3 received, 0% packet loss, time 2003msrtt min/avg/max/mdev = 10.329/10.785/11.239/0.371 ms

also, what happens if we lose a ping response? this seems to assume the ping packets always come back, but that seems difficult to guarantee in general on a lossy network?

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I believe thePing func would return an error and we'd exit... I'll check.

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Fixed in the latest iteration. Just like ping, failures will display inline.

We don't have stats yet, but that can be added later on!

@kylecarbskylecarbs requested a review fromjawnsyAugust 9, 2021 16:55
Copy link
Contributor

@jawnsyjawnsy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

just really minor comments, I suggest just merging & we can iterate later if needed 🎉

@kylecarbskylecarbs merged commit9244ee8 intomasterAug 9, 2021
@kylecarbskylecarbs deleted the ping branchAugust 9, 2021 18:32
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@jawnsyjawnsyjawnsy approved these changes

@f0sself0sselAwaiting requested review from f0ssel

Assignees

@kylecarbskylecarbs

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@kylecarbs@jawnsy

[8]ページ先頭

©2009-2025 Movatter.jp