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
Calculate and expose more individual peer info through peers
endpoint
#3393
Conversation
src/overlay/TCPPeer.cpp
Outdated
a = std::chrono::duration_cast<std::chrono::milliseconds>(b); | ||
} | ||
}; | ||
updateMax(peerMetrics.mMaxMessageDelayInWriteQueue, qdelay); |
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.
Why do we use all-time max? Not sure it's helpful, as this data decays overtime and provides less insight into what's going on.
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.
Updated to show P99s from the last 300-second window
Here's a sample output for one peer when
|
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.
Looks good to me overall! One thing I realized is that reporting p99 for the timers maybe isn't as useful as, say, p75, so perhaps we should report that instead.
@@ -1007,7 +1064,12 @@ Peer::maybeSendNextBatch() | |||
auto& timer = front.mMessage->type() == SCP_MESSAGE | |||
? om.mOutboundQueueDelaySCP | |||
: om.mOutboundQueueDelayTxs; | |||
timer.Update(mApp.getClock().now() - front.mTimeEmplaced); | |||
auto& peerTimer = front.mMessage->type() == SCP_MESSAGE |
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.
tiny nit: maybe better to rename timer
to aggregateTimer
for clarity
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!
I will squash the commits tomorrow |
1679f33
to
0064a59
Compare
I just finished squashing the commits. |
r+ 0064a59 |
Description
Resolves #3041
This PR calculates and exposes more metrics for each peer through the
peers
endpoint. The new output can be slightly verbose. Ifcompact=true
, the new output will be the same as the current output.Checklist
clang-format
v8.0.0 (viamake format
or the Visual Studio extension)