This CL implements Welford's algorithm for a
numerically stable computation of the variance.
This implementation is plugged in SamplesStatsCounter class (adapter pattern).
A 'NumericalStability' unit test has been added,
whose previous implementation of SamplesStatsCounter failed to pass.
Follow-up CLs will factorize more occurences of duplicated and misbehaved
computations.
Bug: webrtc:10412
Change-Id: Id807c3d34e9c780fb1cbd769d30b655c575c88ac
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131394
Commit-Queue: Yves Gerey <yvesg@google.com>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27547}
Add missing copy and move operator= and GetVariance and
GetStandardDeviation methods to the SamplesStatsCounter.
Change-Id: I02374aac23a00fdeefda16012311cd860bb4b1b5
Bug: webrtc:10138
Reviewed-on: https://webrtc-review.googlesource.com/c/121653
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26584}
It accumulate sample values inside it and provide API to calc
min/max/avg and percentiles. Current implementation will do it
in O(nlogn) time and planned to be used in the test code after
all time sensitive operations and also assume not too big amount
of data inside.
Bug: webrtc:10138
Change-Id: I262c4b9ca538c19463888b6d6bcdaa7e8c3caa68
Reviewed-on: https://webrtc-review.googlesource.com/c/116284
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26214}