From: richard.n.procter () gmail ! com
Date: Fri, 01 May 2020 10:12:05 +0000
To: openbsd-tech
Subject: [PATCH] add ping(1)-like stats to tcpbench(1)
Hi,
This implements ping(1)-like summary statistics for tcpbench(1), e.g.
^C
--- localhost tcpbench statistics ---
1099642814 bytes sent over 4.126 seconds
bandwidth min/avg/max/std-dev = 1228.131/2117.309/2491.399/517.779 Mbps
Std-dev assumes a Gaussian distribution which is unlikely if there are
issues.
(I would agree that a working LAN link would have very low std-dev.)
Percentiles would be more informative and avoids the Gaussian
assumption.
TCP also benefits/suffers from slowstart, which would bias any
short-term
measures. Why not suggest users just "tcpbench -r 200" and compute
their own statistics? (Note your example above is probably showing TCP
slowstart behaviour).
+ printf("bandwidth min/avg/max/std-dev = %.3Lf/%.3Lf/%.3Lf/%.3Lf
Mbps\n",
+ mainstats.floor_mbps, mainstats.mean_mbps, mainstats.peak_mbps,
+ std_dev);
More assumptions are implied here. How do I measure a 2400 bps link
with this
report? The precision is lost in "%.3Lf".
Some nits:
+ long double mbps, old_mean_mbps, slice_mbps = 0;
"long double" is a waste of bits. A double is sufficient.
No diff for the manpage.
A question: when does a TCP "std-dev" tell you more than a ping
"std-dev"?
John