webrtc/modules/pacing
Henrik Boström d81992197c [Stats] Update totalPacketSendDelay to only cover time in pacer queue.
This metric was always supposed to be the spec's answer to
googBucketDelay, and is defined as "The total number of seconds that
packets have spent buffered locally before being transmitted onto the
network." But our implementation measured the time between capture and
send, including encode time. This is incorrect and yields a much larger
value than expected.

This CL updated the metric to do what the spec says. Implementation-wise
we measure the time between pushing and popping each packet from the
queue (in modules/pacing/prioritized_packet_queue.cc).

The spec says to increment the delay counter at the same time as we
increment the packet counter in order for the app to be able to do
"delta totalPacketSendDelay / delta packetSent". For this reason,
`total_packet_delay` is added to RtpPacketCounter. (Previously, the
two counters were incremented on different threads and observers.)

Running Google Meet on a good network, I could observe a 2-3 ms average
send delay per packet with this implementation compared to 20-30 ms
with the old implementation. See b/137014977#comment170 for comparison
with googBucketDelay which is a little bit different by design -
totalPacketSendDelay is clearly better than googBucketDelay.

Since none of this depend on the media kind, we can wire up this metric
for audio as well in a follow-up:
https://webrtc-review.googlesource.com/c/src/+/280523

Bug: webrtc:14593
Change-Id: If8fcd82fee74030d0923ee5df2c2aea2264600d4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/280443
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38480}
2022-10-26 21:29:20 +00:00
..
g3doc Update pacer documentation. 2022-06-09 12:04:24 +00:00
bitrate_prober.cc Make it possible to set the packet size needed to trigger a probe. 2022-09-15 10:13:57 +00:00
bitrate_prober.h Make it possible to set the packet size needed to trigger a probe. 2022-09-15 10:13:57 +00:00
bitrate_prober_unittest.cc Make it possible to set the packet size needed to trigger a probe. 2022-09-15 10:13:57 +00:00
BUILD.gn Use MaybeWorkerThread in TaskQueuePacedSender 2022-10-05 11:48:04 +00:00
DEPS WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 12/inf 2022-03-29 10:14:00 +00:00
interval_budget.cc Fix potential signed overflow in IntervalBudget::set_target_rate_kbps 2019-06-18 15:42:54 +00:00
interval_budget.h Fix potential signed overflow in IntervalBudget::set_target_rate_kbps 2019-06-18 15:42:54 +00:00
interval_budget_unittest.cc Make interval budget use ratio instead of percent 2019-06-07 08:53:57 +00:00
OWNERS Revise video owners 2022-09-30 08:44:30 +00:00
pacing_controller.cc PacingController: remove unused kDefaultPaceMultiplier 2022-10-05 10:30:23 +00:00
pacing_controller.h PacingController: remove unused kDefaultPaceMultiplier 2022-10-05 10:30:23 +00:00
pacing_controller_unittest.cc Prepare packet router for flushing mechanism. 2022-09-09 13:54:05 +00:00
packet_router.cc Prepare packet router for flushing mechanism. 2022-09-09 13:54:05 +00:00
packet_router.h Prepare packet router for flushing mechanism. 2022-09-09 13:54:05 +00:00
packet_router_unittest.cc Prepare packet router for flushing mechanism. 2022-09-09 13:54:05 +00:00
prioritized_packet_queue.cc [Stats] Update totalPacketSendDelay to only cover time in pacer queue. 2022-10-26 21:29:20 +00:00
prioritized_packet_queue.h Add field trial for fast retransmissions. 2022-08-29 11:52:14 +00:00
prioritized_packet_queue_unittest.cc Add field trial for fast retransmissions. 2022-08-29 11:52:14 +00:00
rtp_packet_pacer.h Use ProbeClusterConfig in BitrateProber from GoogCC 2022-05-17 12:29:25 +00:00
task_queue_paced_sender.cc Use MaybeWorkerThread in TaskQueuePacedSender 2022-10-05 11:48:04 +00:00
task_queue_paced_sender.h Use MaybeWorkerThread in TaskQueuePacedSender 2022-10-05 11:48:04 +00:00
task_queue_paced_sender_unittest.cc Use MaybeWorkerThread in TaskQueuePacedSender 2022-10-05 11:48:04 +00:00