#!/usr/bin/env gnuplot # termsize 7cm,7cm set grid set xlabel "Frames [×1000]" set ylabel "RX Time [ms]" set key left reverse Left fit ard*x+brd "data" using 1:5 via ard, brd fit arm*x+brm "data" using 1:10 via arm, brm fit awr*x+bwr "data" using 1:3 via awr, bwr fit asm*x+bsm "data" using 1:8 via asm, bsm set yrange [0:] set y2range [0:] set multiplot layout 1,2 set ylabel "RX Time [µs]" plot 'data' using ($1/1000):($5/$1) with lp lc 1 title 'read()', \ 'data' using ($1/1000):($10/$1) with lp lc 1 title 'recvmmsg()', \ ard with lines lt 1 lc rgbcolor "#aa0000" lw 1 title "", \ arm with lines lt 2 lc rgbcolor "#aa0000" lw 1 title "" set ylabel "TX Time [µs]" plot 'data' using ($1/1000):($3/$1) with lp lc 2 title 'write()', \ 'data' using ($1/1000):($8/$1) with lp lc 2 title 'sendmmsg()', \ awr with lines lt 1 lc rgbcolor "#00aa00" lw 1 title "", \ asm with lines lt 2 lc rgbcolor "#00aa00" lw 1 title "" unset multiplot # ard*x+brd - arm*x-brm = 0 # (ard-arm)*x = brm-brd xeq = (brm-brd)/(ard-arm) print "ard = ", ard print "arm = ", arm print "arm/ard = ", arm/ard print "Intersection at x = ", xeq print "" xeq = (bsm-bwr)/(awr-asm) print "awr = ", awr print "asm = ", asm print "asm/awr = ", asm/awr print "Intersection at x = ", xeq print "" print "recvmmsg speedup [%]: ", 100-(arm/ard*100) print "sendmmsg speedup [%]: ", 100-(asm/awr*100)