-
Notifications
You must be signed in to change notification settings - Fork 887
feat!: add summary to coder ping
#14762
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @ethanndickson and the rest of your teammates on |
6fefb45
to
02d2b5a
Compare
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 didn't read the diagnostics in your post but I think all diagnostics need to go at the end rather than some first and some afterwards.
c7a014b
to
d696bef
Compare
d696bef
to
d1040d5
Compare
if s.Successful > 0 { | ||
s.Avg = ptr.Ref(time.Duration(s.latencySum / float64(s.Successful) * float64(time.Second))) | ||
} | ||
if s.Successful > 1 { | ||
s.Variance = ptr.Ref(time.Duration((s.m2 / float64(s.Successful-1)) * float64(time.Second))) | ||
} |
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.
This can be calculated on every addResult call no?
Wait, in your updated description you're dumping whether it's ping/p2p first? You can't log that until after you've finished pinging |
Was the only diagnostic left at the end when you said:
So I moved it up! We're doing the silent ping ammar suggested to determine whether or not we'll show diagnostics at all, which is what I used to print it - but I'm definitely in favour of keeping it at the end. |
d1040d5
to
0efd6ed
Compare
Closes #14752.
This is a breaking change, as the default behavior of
coder ping
is now to ping indefinitely, until an interrupt is detected (alike many other ping commands, e.g.iputils ping
). Previously,coder ping
performed 10 pings by default. The-n
argument can still be used to perform a fixed number of pings.All diagnostics are also now written to
stderr
, instead ofstdout
.New format with diagnostics included:
(These links will be broken until the next release, as the troubleshooting page wasn't included in
v2.15.0
)