Skip to content
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

statistic reporting #70

Open
lu-zero opened this issue Jan 18, 2021 · 3 comments · Fixed by #130
Open

statistic reporting #70

lu-zero opened this issue Jan 18, 2021 · 3 comments · Fixed by #130
Milestone

Comments

@lu-zero
Copy link
Contributor

lu-zero commented Jan 18, 2021

If #53 wants to be more or less compatible with the reference implementation API, it might be good to support extracting the same statistics.

// Performance monitor with Byte counters for better bitrate estimation.
int srt_bstats(SRTSOCKET u, SRT_TRACEBSTATS * perf, int clear);

// Performance monitor with Byte counters and instantaneous stats instead of moving averages for Snd/Rcvbuffer sizes.
int srt_bistats(SRTSOCKET u, SRT_TRACEBSTATS * perf, int clear, int instantaneous);

With SRT_TRACEBSTATS containing the following:

Statistic Type of Statistic Unit of Measurement Available for Sender Available for Receiver Data Type Completed
msTimeStamp accumulated ms (milliseconds) int64_t
pktSentTotal accumulated packets - int64_t
pktRecvTotal accumulated packets - int64_t
pktSentUniqueTotal accumulated packets - int64_t
pktRecvUniqueTotal accumulated packets - int64_t
pktSndLossTotal accumulated packets - int32_t
pktRcvLossTotal accumulated packets - int32_t
pktRetransTotal accumulated packets - int32_t
pktRcvRetransTotal accumulated packets - int32_t
pktSentACKTotal accumulated packets - int32_t
pktRecvACKTotal accumulated packets - int32_t
pktSentNAKTotal accumulated packets - int32_t
pktRecvNAKTotal accumulated packets - int32_t
usSndDurationTotal accumulated us (microseconds) - int64_t
pktSndDropTotal accumulated packets - int32_t
pktRcvDropTotal accumulated packets - int32_t
pktRcvUndecryptTotal accumulated packets - int32_t
pktSndFilterExtraTotal accumulated packets - int32_t
pktRcvFilterExtraTotal accumulated packets - int32_t
pktRcvFilterSupplyTotal accumulated packets - int32_t
pktRcvFilterLossTotal accumulated packets - int32_t
byteSentTotal accumulated bytes - uint64_t
byteRecvTotal accumulated bytes - uint64_t
byteSentUniqueTotal accumulated bytes - uint64_t
byteRecvUniqueTotal accumulated bytes - uint64_t
byteRcvLossTotal accumulated bytes - uint64_t
byteRetransTotal accumulated bytes - uint64_t
byteSndDropTotal accumulated bytes - uint64_t
byteRcvDropTotal accumulated bytes - uint64_t
byteRcvUndecryptTotal accumulated bytes - uint64_t
pktSent interval-based packets - int64_t
pktRecv interval-based packets - int64_t
pktSentUnique interval-based packets - int64_t
pktRecvUnique interval-based packets - int64_t
pktSndLoss interval-based packets - int32_t
pktRcvLoss interval-based packets - int32_t
pktRetrans interval-based packets - int32_t
pktRcvRetrans interval-based packets - int32_t
pktSentACK interval-based packets - int32_t
pktRecvACK interval-based packets - int32_t
pktSentNAK interval-based packets - int32_t
pktRecvNAK interval-based packets - int32_t
pktSndFilterExtra interval-based packets - int32_t
pktRcvFilterExtra interval-based packets - int32_t
pktRcvFilterSupply interval-based packets - int32_t
pktRcvFilterLoss interval-based packets - int32_t
mbpsSendRate interval-based Mbps - double
mbpsRecvRate interval-based Mbps - double
usSndDuration interval-based us (microseconds) - int64_t
pktReorderDistance interval-based packets - int32_t
pktRcvBelated interval-based packets - int64_t
pktSndDrop interval-based packets - int32_t
pktRcvDrop interval-based packets - int32_t
pktRcvUndecrypt interval-based packets - int32_t
byteSent interval-based bytes - uint64_t
byteRecv interval-based bytes - uint64_t
byteSentUnique interval-based bytes - uint64_t
byteRecvUnique interval-based bytes - uint64_t
byteRcvLoss interval-based bytes - uint64_t
byteRetrans interval-based bytes - uint64_t
byteSndDrop interval-based bytes - uint64_t
byteRcvDrop interval-based bytes - uint64_t
byteRcvUndecrypt interval-based bytes - uint64_t
usPktSndPeriod instantaneous us (microseconds) - double
pktFlowWindow instantaneous packets - int32_t
pktCongestionWindow instantaneous packets - int32_t
pktFlightSize instantaneous packets - int32_t
msRTT instantaneous ms (milliseconds) double
mbpsBandwidth instantaneous Mbps double
byteAvailSndBuf instantaneous bytes - int32_t
byteAvailRcvBuf instantaneous bytes - int32_t
mbpsMaxBW instantaneous Mbps - double
byteMSS instantaneous bytes int32_t
pktSndBuf instantaneous packets - int32_t
byteSndBuf instantaneous bytes - int32_t
msSndBuf instantaneous ms (milliseconds) - int32_t
msSndTsbPdDelay instantaneous ms (milliseconds) - int32_t
pktRcvBuf instantaneous packets - int32_t
byteRcvBuf instantaneous bytes - int32_t
msRcvBuf instantaneous ms (milliseconds) - int32_t
msRcvTsbPdDelay instantaneous ms (milliseconds) - int32_t
pktReorderTolerance instantaneous packets - int32_t
pktRcvAvgBelatedTime instantaneous ms (milliseconds) - double
@russelltg
Copy link
Owner

russelltg commented Jan 18, 2021

Related to #54

Thanks for the list, I added checkmarks to track these.

I think I'm going to go the route of the EventReceiver trait in #54 (not fully implemented, and that branch is a bit stale), which I would expect that there would also be a "default" implementation that provides these statistics

I also very much assume this relies on the currently unimplemented NAKREPORT SRT packet

@russelltg russelltg added this to the 1.0 milestone Jan 18, 2021
@robertream robertream mentioned this issue Nov 18, 2021
@russelltg russelltg linked a pull request Nov 18, 2021 that will close this issue
@robertream
Copy link
Collaborator

@russelltg you might want to reopen this, we aren't done with implementing all of the statistics.

@russelltg russelltg reopened this Nov 19, 2021
@russelltg
Copy link
Owner

Thanks, was just blindly linking issues apparently :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants