-
Notifications
You must be signed in to change notification settings - Fork 47
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
Add counters for bytes sent by ICE pings (#534) #535
Conversation
jonasore
commented
Jan 16, 2020
- Fixes Add metric for bytes sent for connectivity/consent requests and responses #534
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.
@alvestrand can you take a look? Is connectivity bytes for checks well-defined?
</dt> | ||
<dd> | ||
<p> | ||
Total number of bytes sent for connectivity checks. |
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.
Does this include the headers or only the payload? We should be consistent across the dictionaries that the measurement of bytesSent and bytesReceived.
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.
The definition of "bytesSent" should be clear about whether ICE checks are counted or not. At the moment, I think it's not clear.
(I think they should not be included in "bytesSent", because they are overhead seen from the user. But the most important thing is that it is clear.)
RTCIceCandidatePairStats.bytesSent is said to only be payload bytes. Does ICE pings contain any payload? How do you intend to use these counters? I'm wondering if the current implementation of candidate pair bytes sent is correct. Or if you want to subtract ICE pings from the transport bytes sent I wonder if we need to add these metrics to the transport dictionary. Do we know ICE candidate pair stats are supposed to be deleted? |
Can you add text to bytesSent to say whether STUN pings are included or not? |
Answers:
This payload for the ICE pings. I'm not sure about ip headers as such, but I assume they are not counted. (can check in rest of documentation about that)
No
I modified an ICE agent to send more pings, I would like to be able to add up how much that "cost" and compare it to the actual payload sent. I'm currently not 100% certain to how they are counted wrt to the existing counters.
Don't understand. |
When we talk about header bytes in other places we are not talking about transport-layer headers like TCP or UDP. So for RTP packets, the headers are the size of the RTP headers. The ICE packets should contain an ICE protocol header, to distinguish it from RTP packets, I guess?
So if I sent 1 kB of ICE ping I would expect bytesSent to increase by 0? |
|
that said...i'm no longer super worried about my extra bytes... |
I think it would make sense to treat bytes sent in ICE packets as "overhead only" - that is, not count them in RTCIceCandidatePair.bytesSent. But if they're currently counted as part of bytesSent, it's a compatibility problem to change that, and we should change the documentation of bytesSent instead. Jonas, do you know if they're counted at present or not? |
One question is if they are included in bytesSent or not in the current chromium implementation. |
first looking at send: it seems that the bytes are not included in bytesSent The send_tracker in then used to populate stats object: https://source.chromium.org/chromium/chromium/src/+/master:third_party/webrtc/p2p/base/connection.cc;l=1206;drc=34ad93361f96ad875bf350ced27e15b7aa126113?originalUrl=https:%2F%2Fcs.chromium.org%2F === This would mean that we could add them as "overhead" right ? |
only non-STUN is added to bytesRecevied. |
henbos question: all ICE messages should be STUN messages, |
Seems we're clear then! |