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

[BUG] bytes lost (byteRcvLoss) reporting in stats is broken in 1.5.0 #2414

Closed
maxtomilov opened this issue Jul 23, 2022 · 1 comment · Fixed by #2416
Closed

[BUG] bytes lost (byteRcvLoss) reporting in stats is broken in 1.5.0 #2414

maxtomilov opened this issue Jul 23, 2022 · 1 comment · Fixed by #2416
Labels
[core] Area: Changes in SRT library core Type: Bug Indicates an unexpected problem or unintended behavior
Milestone

Comments

@maxtomilov
Copy link
Contributor

Since 1.5.0 SRT_TRACEBSTATS::byteRcvLoss retrieved with srt_bstats always contain the same value as byteRecv (as all packets were lost). Looks like it was broken in 5f7bc23 and should be set to m_stats.rcvr.lost.trace.bytesWithHdr() instead of m_stats.rcvr.recvd.trace.bytesWithHdr in srt::CUDT::bstats.

@maxtomilov maxtomilov added the Type: Bug Indicates an unexpected problem or unintended behavior label Jul 23, 2022
@maxtomilov
Copy link
Contributor Author

diff --git a/srtcore/core.cpp b/srtcore/core.cpp
index 6fd28c9..b07dc96 100644
--- a/srtcore/core.cpp
+++ b/srtcore/core.cpp
@@ -7401,7 +7401,7 @@ void srt::CUDT::bstats(CBytePerfMon *perf, bool clear, bool instantaneous)
         perf->byteRecv       = m_stats.rcvr.recvd.trace.bytesWithHdr();
         perf->byteRecvUnique = m_stats.rcvr.recvdUnique.trace.bytesWithHdr();
         perf->byteRetrans    = m_stats.sndr.sentRetrans.trace.bytesWithHdr();
-        perf->byteRcvLoss    = m_stats.rcvr.recvd.trace.bytesWithHdr();
+        perf->byteRcvLoss    = m_stats.rcvr.lost.trace.bytesWithHdr();
 
         perf->pktSndDrop  = m_stats.sndr.dropped.trace.count();
         perf->pktRcvDrop  = m_stats.rcvr.dropped.trace.count() + m_stats.rcvr.undecrypted.trace.count();

@maxsharabayko maxsharabayko added this to the Next Release milestone Jul 25, 2022
@maxsharabayko maxsharabayko added the [core] Area: Changes in SRT library core label Jul 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[core] Area: Changes in SRT library core Type: Bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants