Preparation for E2E latency tuning - #786
Conversation
bc3295d to
99c8903
Compare
a475567 to
5e85289
Compare
This comment was marked as resolved.
This comment was marked as resolved.
gavv
left a comment
There was a problem hiding this comment.
Wow, this is big.
I like the approach you use for RTS (set early when possible, set later as a fallback).
| if ((code = repair_endpoint_->pull_packets(0)) != status::StatusOK) { | ||
| return code; | ||
| } | ||
| } |
There was a problem hiding this comment.
Same comment as for receiver slot.
There was a problem hiding this comment.
I support your thought, but it will make pipeline tests dependent on real-time speed.
So far, LatencyMonitor calls core::timestamp(core::ClockUnix) when it computes latency_metrics_.niq_stalling. If we will set receive timestamp on all passing packets (which is your proposition here), we could not tell the difference between test and real use scenario. In order to pass these tests, I've set base_cts to current timestamp:
diff --git a/src/tests/roc_pipeline/test_loopback_sink_2_source.cpp b/src/tests/roc_pipeline/test_loopback_sink_2_source.cpp
index 4c47930e..2d7e188c 100644
--- a/src/tests/roc_pipeline/test_loopback_sink_2_source.cpp
+++ b/src/tests/roc_pipeline/test_loopback_sink_2_source.cpp
@@ -569,7 +569,7 @@ void send_receive(int flags,
core::nanoseconds_t virtual_e2e_latency = 0;
if (flags & FlagCTS) {
- send_base_cts = 1000000000000000;
+ send_base_cts = core::timestamp(core::ClockUnix);
virtual_e2e_latency = core::Millisecond * 100;
}In receiver_source test latency_lower_bound I had to do the same.
Please, take a look onto 6bd629e
There was a problem hiding this comment.
So, I propose to hold this change, until (if) we decide to introduce mock for core::timestamp(...) in pipeline tests.
There was a problem hiding this comment.
Oh, I see. That's not good but I agree that it's outside of scope of this PR. I'll try to take a look at it later, will add it to my todo. Let's follow your proposal then.
There was a problem hiding this comment.
I've reverted these changes for the time being
This comment was marked as resolved.
This comment was marked as resolved.
7837ebe to
6bd629e
Compare
20a7b7a to
40c5dd5
Compare
This comment was marked as resolved.
This comment was marked as resolved.
40c5dd5 to
75a91d8
Compare
c429757 to
d0f9d22
Compare
516ed74 to
e211975
Compare
This comment was marked as resolved.
This comment was marked as resolved.
e211975 to
2bf7513
Compare
|
@gavv "No conflicts with base branch" -- no excuses to not merge it? I removed the commit where I deleted public-api tests, don't remember reason for that to exist. |
In order to be able to tune receiver's latency relying on timestamp mapping that we get from RTCP feedback, and UDP::Receive_timestamp, adding these features: * roc-streaminggh-674: Use receive timestamp (RTS) as report time when processing RTCP report; * RTT dumping for debugging (csvplotter ts_offset branch); * SCHED_RR for network io thread (run with root privs).
1. Don't use LogError in utility code because only upper layer decides if it's actually an error. 2. Remove StatusFailedRealtime, we already have StatusErrThread for thread setup failures. 3. Rename capture_ts -> receive_ts for consistency. 4. Cleanup log messages, log levels, typos.
Bare parameters don't scale well - tests already became polluted with DEFAULT_PRIORITY, adding more params will add more noise. So introduce the usual config struct for NetworkLoop and replace DEFAULT_PRIORITY with default value of its field.
Similar to NetworkConfig::realtime_prio, add IoConfig::realtime_prio.
Add new group "Perf options" and move --real-time flag there.
Pass current time from pipeline to from refresh(), called before every frame read. Integration tests already pass virtual time to pipeline refresh(), so LatencyMonitor automatically starts working with proper time.
gh-127
In order to be able to tune receiver's latency
relying on timestamp mapping that we get from
RTCP feedback, and UDP::Receive_timestamp,
adding these features:
RTCP improvements #674: Use receive timestamp (RTS) as report time when processing RTCP report;
RTT dumping for debugging (csvplotter ts_offset branch);
SCHED_RR for network io thread (run with root privs).