passt/test/lib
David Gibson f9ff6678d4 test/perf: Get iperf3 stats from client side
iperf3 generates statistics about its run on both the client and server
sides.  They don't have exactly the same information, but both have the
pieces we need (AFAICT the server communicates some nformation to the
client over the control socket, so the most important information is in the
client side output, even if measured by the server).

Currently we use the server side information for our measurements. Using
the client side information has several advantages though:

 * We can directly wait for the client to complete and we know we'll have
   the output we want.  We don't need to sleep to give the server time to
   write out the results.
 * That in turn means we can wrap up as soon as the client is done, we
   don't need to wait overlong to make sure everything is finished.
 * The slightly different organisation of the data in the client output
   means that we always want the same json value, rather than requiring
   slightly different onces for UDP and TCP.

The fact that we avoid some extra delays speeds up the overal run of the
perf tests by around 7 minutes (out of around 35 minutes) on my laptop.

The fact that we no longer unconditionally kill client and server after
a certain time means that the client could run indefinitely if the server
doesn't respond.  We mitigate that by setting 1s connect timeout on the
client.  This isn't foolproof - if we get an initial response, but then
lose connectivity this could still run indefinitely, however it does cover
by far the most likely failure cases.  --snd-timeout would provide more
robustness, but I've hit odd failures when trying to use it.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
2023-11-07 09:56:06 +01:00
..
context test: Use "nstool exec" to slightly simplify tests 2023-04-08 01:12:08 +02:00
layout passt: Relicense to GPL 2.0, or any later version 2023-04-06 18:00:33 +02:00
layout_ugly passt: Relicense to GPL 2.0, or any later version 2023-04-06 18:00:33 +02:00
perf_report passt: Relicense to GPL 2.0, or any later version 2023-04-06 18:00:33 +02:00
setup test: Use "nstool exec" to slightly simplify tests 2023-04-08 01:12:08 +02:00
setup_ugly passt: Relicense to GPL 2.0, or any later version 2023-04-06 18:00:33 +02:00
term passt: Relicense to GPL 2.0, or any later version 2023-04-06 18:00:33 +02:00
test test/perf: Get iperf3 stats from client side 2023-11-07 09:56:06 +01:00
util passt: Relicense to GPL 2.0, or any later version 2023-04-06 18:00:33 +02:00
video passt: Relicense to GPL 2.0, or any later version 2023-04-06 18:00:33 +02:00