monitor: Add latency standard deviation
The latency range and moving average alone do not tell a link that is consistently slow apart from one that is unstable. A high average with a low deviation points at the scheduling or the interval configuration, while a low average with a high deviation points at interference, retransmissions or controller buffer stalls. Track the sample count along with the sum and the sum of the squares in struct packet_latency, and report the resulting standard deviation on the latency lines of both the live decoding and the analyze mode. The samples are squared in usec and only scaled down to msec^2 afterwards, so that the sub-msec resolution is not lost while the running sum stays clear of an overflow. The model derived the accumulator layout and the scaling, which the author reviewed and verified against an independently computed deviation. Assisted-by: opencode:claude-opus-5
L
Luiz Augusto von Dentz committed
24a46bbd3b78e287ac1d49a26859d7c5e1872d12
Parent: 5ef24e7