Add delayed packet outage event metric.

Can be used to calculate the average delayed packet outage duration and
number of packet loss events by subtracting from concealment events.

Only used in simulations currently.

Bug: None
Change-Id: I03740a2bcb781af09e28a4d13d9e41c0f84bc506
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/303600
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39957}
This commit is contained in:
Jakob Ivarsson 2023-04-25 21:01:15 +02:00 committed by WebRTC LUCI CQ
parent ecdedac3da
commit 2bd878180a
3 changed files with 4 additions and 0 deletions

View File

@ -76,6 +76,7 @@ struct NetEqLifetimeStatistics {
uint64_t packets_discarded = 0;
// Below stats are not part of the spec.
uint64_t delayed_packet_outage_samples = 0;
uint64_t delayed_packet_outage_events = 0;
// This is sum of relative packet arrival delays of received packets so far.
// Since end-to-end delay of a packet is difficult to measure and is not
// necessarily useful for measuring jitter buffer performance, we report a

View File

@ -300,6 +300,7 @@ void StatisticsCalculator::LogDelayedPacketOutageEvent(int num_samples,
100 /* bucket count */);
delayed_packet_outage_counter_.RegisterSample();
lifetime_stats_.delayed_packet_outage_samples += num_samples;
++lifetime_stats_.delayed_packet_outage_events;
}
void StatisticsCalculator::StoreWaitingTime(int waiting_time_ms) {

View File

@ -90,6 +90,8 @@ void NetEqStatsPlotter::SimulationEnded(int64_t simulation_time_ms) {
lifetime_stats.concealment_events);
printf(" delayed_packet_outage_samples: %" PRIu64 "\n",
lifetime_stats.delayed_packet_outage_samples);
printf(" delayed_packet_outage_events: %" PRIu64 "\n",
lifetime_stats.delayed_packet_outage_events);
printf(" num_interruptions: %d\n", lifetime_stats.interruption_count);
printf(" sum_interruption_length_ms: %d ms\n",
lifetime_stats.total_interruption_duration_ms);