Closed ndfred closed 4 years ago
Build issues:
struct iperf_test
doesn't have a sender
field (see https://github.com/esnet/iperf/commit/0778f04c)struct TimerStruct
doesn't have a tv_sec
field (see https://github.com/esnet/iperf/commit/cde81d76)Tests look fine, but the progress bar doesn't work anymore PGO errors while building too
Xcode logs when adding NSLog(@"Elapsed: %.2f (duration: %.2f, test timer: %d, test usec timer: %d, now: %ld)", test_elapsed, test_duration, test->timer->time.secs, test->timer->time.usecs, now.tv_sec);
to the test progress update code, looks like the test timer doesn't move:
2019-10-14 00:05:07.173638+0100 iperf[1740:35628] Elapsed: 1571005094.00 (duration: 10.00, test timer: 2823, test usec timer: 21962, now: 1571007907)
2019-10-14 00:05:08.173552+0100 iperf[1740:35628] Elapsed: 1571005095.00 (duration: 10.00, test timer: 2823, test usec timer: 21962, now: 1571007908)
2019-10-14 00:05:09.173770+0100 iperf[1740:35628] Elapsed: 1571005096.00 (duration: 10.00, test timer: 2823, test usec timer: 21962, now: 1571007909)
2019-10-14 00:05:10.173667+0100 iperf[1740:35628] Elapsed: 1571005097.00 (duration: 10.00, test timer: 2823, test usec timer: 21962, now: 1571007910)
2019-10-14 00:05:11.173638+0100 iperf[1740:35628] Elapsed: 1571005098.00 (duration: 10.00, test timer: 2823, test usec timer: 21962, now: 1571007911)
2019-10-14 00:05:12.173548+0100 iperf[1740:35628] Elapsed: 1571005099.00 (duration: 10.00, test timer: 2823, test usec timer: 21962, now: 1571007912)
2019-10-14 00:05:13.173599+0100 iperf[1740:35628] Elapsed: 1571005100.00 (duration: 10.00, test timer: 2823, test usec timer: 21962, now: 1571007913)
2019-10-14 00:05:14.173582+0100 iperf[1740:35628] Elapsed: 1571005101.00 (duration: 10.00, test timer: 2823, test usec timer: 21962, now: 1571007914)
2019-10-14 00:05:15.173709+0100 iperf[1740:35628] Elapsed: 1571005102.00 (duration: 10.00, test timer: 2823, test usec timer: 21962, now: 1571007915)
It looks like stats_timer
does move but the reference is not the current time. Time to actually dig into https://github.com/esnet/iperf/commit/cde81d76 and understand what is going on.
a8e2ca6 updates iPerf3 to version 3.8.1, early simulator tests are looking good. There is an off-by-one error when updating the progress bar, it shows 100% progress before the end of the test.
1424d726bed126a6e163488fcfaa514b6fae8c7f updates to iPerf3 3.9, same issues as with 3.8.1
Added more logging to understand why the UI completes before the end, it looks like we flag 100% progress before the end of the test, and start at 20% when we should start at 10% (this is a 10 seconds test):
2020-11-14 09:35:27.966407+0000 iperf[35377:816483] Starting the test
Connecting to host 192.168.1.11, port 5201
Reverse mode, remote host 192.168.1.11 is sending
[ 7] local 192.168.1.60 port 59083 connected to 192.168.1.11 port 5201
[ 9] local 192.168.1.60 port 59084 connected to 192.168.1.11 port 5201
[ 11] local 192.168.1.60 port 59085 connected to 192.168.1.11 port 5201
[ 13] local 192.168.1.60 port 59086 connected to 192.168.1.11 port 5201
[ 15] local 192.168.1.60 port 59087 connected to 192.168.1.11 port 5201
2020-11-14 09:35:29.052409+0000 iperf[35377:816483] Bandwidth on 5 streams: 290.93 Mbits/s (retransmits: 0, lost: 0.00%, jitter: 0, interval: 1.00s)
2020-11-14 09:35:29.052672+0000 iperf[35377:816483] Test duration: 10.00s, elapsed: 2.00, progress: 0.20
2020-11-14 09:35:29.052873+0000 iperf[35377:816483] Bandwidth: 290.93, progress: 0.20
2020-11-14 09:35:30.052418+0000 iperf[35377:816483] Bandwidth on 5 streams: 290.38 Mbits/s (retransmits: 0, lost: 0.00%, jitter: 0, interval: 1.00s)
2020-11-14 09:35:30.052710+0000 iperf[35377:816483] Test duration: 10.00s, elapsed: 3.00, progress: 0.30
2020-11-14 09:35:30.052869+0000 iperf[35377:816483] Bandwidth: 290.38, progress: 0.30
2020-11-14 09:35:31.052409+0000 iperf[35377:816483] Bandwidth on 5 streams: 307.67 Mbits/s (retransmits: 0, lost: 0.00%, jitter: 0, interval: 1.00s)
2020-11-14 09:35:31.052688+0000 iperf[35377:816483] Test duration: 10.00s, elapsed: 4.00, progress: 0.40
2020-11-14 09:35:31.052831+0000 iperf[35377:816483] Bandwidth: 307.67, progress: 0.40
2020-11-14 09:35:32.052361+0000 iperf[35377:816483] Bandwidth on 5 streams: 307.55 Mbits/s (retransmits: 0, lost: 0.00%, jitter: 0, interval: 1.00s)
2020-11-14 09:35:32.052617+0000 iperf[35377:816483] Test duration: 10.00s, elapsed: 5.00, progress: 0.50
2020-11-14 09:35:32.052760+0000 iperf[35377:816483] Bandwidth: 307.55, progress: 0.50
2020-11-14 09:35:33.052369+0000 iperf[35377:816483] Bandwidth on 5 streams: 307.89 Mbits/s (retransmits: 0, lost: 0.00%, jitter: 0, interval: 1.00s)
2020-11-14 09:35:33.052609+0000 iperf[35377:816483] Test duration: 10.00s, elapsed: 6.00, progress: 0.60
2020-11-14 09:35:33.052754+0000 iperf[35377:816483] Bandwidth: 307.89, progress: 0.60
2020-11-14 09:35:34.052522+0000 iperf[35377:816483] Bandwidth on 5 streams: 305.95 Mbits/s (retransmits: 0, lost: 0.00%, jitter: 0, interval: 1.00s)
2020-11-14 09:35:34.052758+0000 iperf[35377:816483] Test duration: 10.00s, elapsed: 7.00, progress: 0.70
2020-11-14 09:35:34.052948+0000 iperf[35377:816483] Bandwidth: 305.95, progress: 0.70
2020-11-14 09:35:35.052387+0000 iperf[35377:816483] Bandwidth on 5 streams: 305.86 Mbits/s (retransmits: 0, lost: 0.00%, jitter: 0, interval: 1.00s)
2020-11-14 09:35:35.052660+0000 iperf[35377:816483] Test duration: 10.00s, elapsed: 8.00, progress: 0.80
2020-11-14 09:35:35.052827+0000 iperf[35377:816483] Bandwidth: 305.86, progress: 0.80
2020-11-14 09:35:36.052366+0000 iperf[35377:816483] Bandwidth on 5 streams: 292.81 Mbits/s (retransmits: 0, lost: 0.00%, jitter: 0, interval: 1.00s)
2020-11-14 09:35:36.052612+0000 iperf[35377:816483] Test duration: 10.00s, elapsed: 9.00, progress: 0.90
2020-11-14 09:35:36.052771+0000 iperf[35377:816483] Bandwidth: 292.81, progress: 0.90
2020-11-14 09:35:37.052361+0000 iperf[35377:816483] Bandwidth on 5 streams: 302.44 Mbits/s (retransmits: 0, lost: 0.00%, jitter: 0, interval: 1.00s)
2020-11-14 09:35:37.052610+0000 iperf[35377:816483] Test duration: 10.00s, elapsed: 10.00, progress: 1.00
2020-11-14 09:35:37.052789+0000 iperf[35377:816483] Bandwidth: 302.44, progress: 1.00
iperf Done.
2020-11-14 09:35:38.266851+0000 iperf[35377:816483] Bandwidth on 5 streams: 304.15 Mbits/s (retransmits: 0, lost: 0.00%, jitter: 0, interval: 1.00s)
2020-11-14 09:35:38.267064+0000 iperf[35377:816483] Bandwidth: 304.15, progress: 1.00
2020-11-14 09:35:38.270419+0000 iperf[35377:816483] Not running
This is done now!
This will give us bidirectional tests, but requires changes since it changes the API