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

feat(config): Make the packet timeline configurable. #2163

Merged
merged 8 commits into from
Jun 10, 2024

Conversation

bgrozev
Copy link
Member

@bgrozev bgrozev commented Jun 4, 2024

No description provided.

@JonathanLennox
Copy link
Member

I'm a little concerned what happens to packets that are in flight at the moment the timeline gets turned on.

Maybe restructure it so that PacketInfo.timeline is an EventTimeline? which only gets instantiated if enableTimeline is set, and then everything else checks whether the specific PacketInfo's timeline val is non-null?

@bgrozev
Copy link
Member Author

bgrozev commented Jun 5, 2024

The timeline is configurable in the config file but once initialized doesn't change (payload verification does, via an http api). I just renamed ENABLE_TIMELINE to enableTimeline because I think that's the usual convention

JonathanLennox
JonathanLennox previously approved these changes Jun 5, 2024
@@ -56,7 +58,7 @@ class EventTimeline(
}

fun clone(): EventTimeline {
val clone = EventTimeline(ConcurrentLinkedQueue(timeline))
val clone = EventTimeline(timeline.toMutableList())
Copy link
Member

Choose a reason for hiding this comment

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

Not a new bug, but while you're in there, clone() should pass clock rather than letting it default to Clock.systemUTC().

private val clock: Clock = Clock.systemUTC()
) : Iterable<Pair<String, Duration>> {

private val timeline: MutableList<Pair<String, Duration>> = Collections.synchronizedList(timelineArg)
Copy link
Member

Choose a reason for hiding this comment

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

This shouldn't need the type

@bgrozev bgrozev merged commit b76c7b5 into jitsi:master Jun 10, 2024
3 checks passed
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