Incorrect average timing calculation
agrigorjevs opened this issue · 1 comments
agrigorjevs commented
There is an issue with average timing calculation when running sipsak with -A parameter.
-A parameter as per sources should return min/avg/max timings.
But avg divides the sum of timings by the wrong number.
E.g. sipsak -s sip:10.0.0.1 -A 2 returns
226.149/453.273/227.124 ms
Where 453.273 is the sum of 2 requests instead of average (because it divides the sum by 1)
sipsak -s sip:10.0.0.1 -A 3 returns
222.311/333.668/222.633 ms
Where 333.668 is basically sum of requests divided by 2 (it can be proven by calculating yourself using -vv).
nils-ohlmeier commented
Thank you very much for the report!
Yes there are multiple obvious problems with the timing mode. I'll commit a fix PR shortly.