# termsize 7cm,7cm set grid set xlabel "Frames [×1000]" set ylabel "RX Time [ms]" set y2label "TX Time [ms]" set y2tics 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:] brd=brd/1000 brm=brm/1000 bwr=bwr/1000 bsm=bsm/1000 plot 'data' using ($1/1000):($5/1000) lc 1 title 'read()', \ 'data' using ($1/1000):($10/1000) lc 1 title 'recvmmsg()', \ 'data' using ($1/1000):($3/1000) lc 2 axes x1y2 title 'write()', \ 'data' using ($1/1000):($8/1000) lc 2 axes x1y2 title 'sendmmsg()', \ ard*x+brd with lines lt 1 lc rgbcolor "#aa0000" lw 1 title "", \ arm*x+brm with lines lt 2 lc rgbcolor "#aa0000" lw 1 title "", \ awr*x+bwr with lines axes x1y2 lt 1 lc rgbcolor "#00aa00" lw 1 title "", \ asm*x+bsm with lines axes x1y2 lt 2 lc rgbcolor "#00aa00" lw 1 title "" # aread*x+bread - arecv*x-brecv = 0 # (aread-arecv)*x = brecv-bread 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