From: Guus Sliepen Date: Sat, 14 Mar 2020 15:46:18 +0000 (+0100) Subject: Add a script to generate graphs of the data recorded by the benchmark script. X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=79771fe547709fd77c9364f843ab00ea9e7d6a25;p=utcp Add a script to generate graphs of the data recorded by the benchmark script. --- diff --git a/makegraph b/makegraph new file mode 100755 index 0000000..97b2922 --- /dev/null +++ b/makegraph @@ -0,0 +1,76 @@ +#!/bin/sh +set -e + +LOG_PREFIX=/dev/shm/benchmark-log + +PLOT_SCRIPT=$LOG_PREFIX-plot.script +PLOT_PDF=$LOG_PREFIX-plot.pdf + +cat >$PLOT_SCRIPT < $LOG.recv + grep '\(send\|rtrx\):' $LOG > $LOG.send + fgrep 'snd.cwnd' $LOG > $LOG.cwnd + fgrep 'cwndleft' $LOG > $LOG.left + fgrep 'rtt' $LOG > $LOG.rtt || ( + head -1 $LOG.send | (read ts conn rest; echo $ts $conn rtt 0 srtt 0 rttvar 0 rto 0 >$LOG.rtt) + ) + (fgrep 'fast recovery started' $LOG || true) | while read ts rest; do + echo "set xtics add (\"\" $ts)" >>$PLOT_SCRIPT + done + (fgrep 'retransmitting after timeout' $LOG || true) | while read ts rest; do + echo "set xtics add (\"\" $ts)" >>$PLOT_SCRIPT + done + + cat >>$PLOT_SCRIPT < 0 ? \$4 : 0) title "cwnd left", \ + "$LOG.left" using 1:6 title "sndbuf left" + + unset xtics +EOF +done + +cat >>$PLOT_SCRIPT <