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

StatsForNerds: cleanup and plot packets lost #1414

Merged
merged 1 commit into from
Oct 18, 2024

Conversation

Williangalvani
Copy link
Member

Adds a new red plot line for (instant) packet loss.
useful for correlating video freezes to packet loss

@@ -138,13 +142,15 @@ const webrtcStats = new WebRTCStats({ getStatsInterval: 100 })
function update(): void {
framerateData.value.push(framerate)
bitrateData.value.push(bitrate)
packetLostData.value.push(Math.min(packetLostDelta, maxPacketLost))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't this put a roof on 10?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes. the reasoning here is that the number of lost packets is not as relevant as the fact that packets were lost, so if I left it "unbounded", and we had 1000 packets lost between two messages, our ceiling would go to 1000. If we then lost 1 packet, it would be so small in the plot we wouldn't be able to see them.

image
In this image, for instance, I don't really care about how many packets were lost. I care that they were lost and we managed to recover.
Does that make sense?

TLDR: I put a low value so we can always notice EVERY packet lost

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes a lot of sense!

Copy link
Member

@rafaellehmkuhl rafaellehmkuhl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@rafaellehmkuhl rafaellehmkuhl merged commit 6ac295c into bluerobotics:master Oct 18, 2024
11 checks passed
@Williangalvani Williangalvani deleted the stast-updates branch October 18, 2024 17:49
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 this pull request may close these issues.

2 participants