Skip to content

Fixes bug in group accumulator#291

Merged
sterlingdeng merged 1 commit intopion:masterfrom
sterlingdeng:sdeng/fix_departure_time_group
Dec 20, 2024
Merged

Fixes bug in group accumulator#291
sterlingdeng merged 1 commit intopion:masterfrom
sterlingdeng:sdeng/fix_departure_time_group

Conversation

@sterlingdeng
Copy link
Copy Markdown
Contributor

@sterlingdeng sterlingdeng commented Nov 24, 2024

Description

See referenced issue for background

Reference issue

Fixes #274

@codecov
Copy link
Copy Markdown

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.31%. Comparing base (b820cd3) to head (bad09be).
Report is 1 commits behind head on master.

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.34%   71.31%   -0.03%     
==========================================
  Files          80       80              
  Lines        4477     4483       +6     
==========================================
+ Hits         3194     3197       +3     
- Misses       1151     1153       +2     
- Partials      132      133       +1     
Flag Coverage Δ
go 71.18% <94.11%> (-0.17%) ⬇️
wasm 69.39% <94.11%> (?)

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.

@sterlingdeng sterlingdeng marked this pull request as ready for review November 24, 2024 22:05
func (g *arrivalGroup) add(a cc.Acknowledgment) {
g.packets = append(g.packets, a)
g.arrival = a.Arrival
g.departure = a.Departure
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 sterlingdeng force-pushed the sdeng/fix_departure_time_group branch from 06a4ff4 to 7469b9c Compare November 26, 2024 20:16
@sterlingdeng
Copy link
Copy Markdown
Contributor Author

@mengelbart FYI since you were the original author..

@sterlingdeng
Copy link
Copy Markdown
Contributor Author

@Sean-Der No problem, glad to help.

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

@sterlingdeng sterlingdeng force-pushed the sdeng/fix_departure_time_group branch from 7469b9c to bad09be Compare December 20, 2024 22:07
@sterlingdeng sterlingdeng merged commit e187410 into pion:master Dec 20, 2024
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