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

Fixes bug in group accumulator #291

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sterlingdeng
Copy link
Contributor

@sterlingdeng sterlingdeng commented Nov 24, 2024

Description

See referenced issue for background

Reference issue

Fixes #274

Copy link

codecov bot commented Nov 24, 2024

Codecov Report

Attention: Patch coverage is 94.11765% with 1 line in your changes missing coverage. Please review.

Project coverage is 71.38%. Comparing base (fbbe759) to head (06a4ff4).

Files with missing lines Patch % Lines
pkg/gcc/arrival_group_accumulator.go 90.90% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #291      +/-   ##
==========================================
+ Coverage   71.27%   71.38%   +0.10%     
==========================================
  Files          80       80              
  Lines        4477     4483       +6     
==========================================
+ Hits         3191     3200       +9     
+ Misses       1153     1151       -2     
+ Partials      133      132       -1     
Flag Coverage Δ
go 71.24% <94.11%> (-0.03%) ⬇️
wasm 69.39% <94.11%> (+0.24%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

func (g *arrivalGroup) add(a cc.Acknowledgment) {
g.packets = append(g.packets, a)
g.arrival = a.Arrival
g.departure = a.Departure
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is one of the main changes, the departure time of the group is set to the departure time of the first packet in the group. This makes sense because the point of the packet group is to reduce a group of packets down as if it was all 1 packet.

return 0
}
return b.Departure.Sub(a.packets[len(a.packets)-1].Departure)
return ack.Departure.Sub(group.departure)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Second change is here. The inter departure time is the difference between the ack departure time and the departure time of the group.

This is equivalent to the code here in libwebrtc

@Sean-Der
Copy link
Member

Sean-Der commented Nov 26, 2024

@sterlingdeng thank you for going so deep on this code. I really appreciate it!

Mind squashing your commit into one and doing a commit message with Subject+Body (just describing what you did). Your comments on the PR itself work great. In the future having a nice git log really pays off :)

thanks again!

@sterlingdeng
Copy link
Contributor Author

@mengelbart FYI since you were the original author..

@sterlingdeng
Copy link
Contributor Author

@Sean-Der No problem, glad to help.

Regarding CI: Not sure why it's failing now.. perhaps flakiness?

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

Successfully merging this pull request may close these issues.

A question about arrival_group_accumulator.go
2 participants