5 set xlabel "Frames [×1000]"
6 set ylabel "RX Time [ms]"
7 set key left reverse Left
9 fit ard*x+brd "data" using 1:5 via ard, brd
10 fit arm*x+brm "data" using 1:10 via arm, brm
12 fit awr*x+bwr "data" using 1:3 via awr, bwr
13 fit asm*x+bsm "data" using 1:8 via asm, bsm
18 set multiplot layout 1,2
19 set ylabel "RX Time [µs]"
20 plot 'data' using ($1/1000):($5/$1) with lp lc 1 title 'read()', \
21 'data' using ($1/1000):($10/$1) with lp lc 1 title 'recvmmsg()', \
22 ard with lines lt 1 lc rgbcolor "#aa0000" lw 1 title "", \
23 arm with lines lt 2 lc rgbcolor "#aa0000" lw 1 title ""
25 set ylabel "TX Time [µs]"
26 plot 'data' using ($1/1000):($3/$1) with lp lc 2 title 'write()', \
27 'data' using ($1/1000):($8/$1) with lp lc 2 title 'sendmmsg()', \
28 awr with lines lt 1 lc rgbcolor "#00aa00" lw 1 title "", \
29 asm with lines lt 2 lc rgbcolor "#00aa00" lw 1 title ""
33 # ard*x+brd - arm*x-brm = 0
34 # (ard-arm)*x = brm-brd
35 xeq = (brm-brd)/(ard-arm)
38 print "arm/ard = ", arm/ard
39 print "Intersection at x = ", xeq
42 xeq = (bsm-bwr)/(awr-asm)
45 print "asm/awr = ", asm/awr
46 print "Intersection at x = ", xeq
48 print "recvmmsg speedup [%]: ", 100-(arm/ard*100)
49 print "sendmmsg speedup [%]: ", 100-(asm/awr*100)