- Notifications
You must be signed in to change notification settings - Fork18
feat: Add Ping command to monitor workspace latency#409
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
internal/cmd/ping.go Outdated
return err | ||
} | ||
fmt.Printf("%.2fms (%s) seq=%d\n", |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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!
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this 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 🎉
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
[ch13708]