|
- # Note:
- # Make sure you run the server w/ the -J option so that the JSON
- # version of the server info is provided instead of the raw text.
-
- set -e
-
- outfile=pps.run.$(TZ=UTC date -Iminutes)
- : > ${outfile}
-
- for tx_pipe in $(jot 4 1); do
- for frame_max in $( jot 20 4 ); do
- (cd /usr/src/sys/modules/usb/cdce; make CONF_CFLAGS="-DCDCE_FRAMES_MAX=${frame_max} -DCDCE_MAX_TX=${tx_pipe}" clean all install) > /dev/null
- sleep .5
- sh reload.cdce.sh
- sleep .5
- starttime=$(TZ=UTC date -Iseconds)
- export tx_pipe frame_max starttime
- jexec testjail iperf3 --get-server-output -J -l 40 -b 800mbps -u -c 172.29.5.4 | jq '. + { tx_pipe: env.tx_pipe, frame_max: env.frame_max, starttime: env.starttime }' >> ${outfile}
- jq -c '{ tx_pipe, frame_max, pps: .server_output_json.intervals | map((.sum.packets - .sum.lost_packets) / .sum.seconds) | max }' ${outfile} | tail -n 1
- done
- done
-
- echo results written to: ${outfile}
|