]> rtime.felk.cvut.cz Git - can-benchmark.git/blob - recvmmsg/plot.gp
Recvmmsg: it is sufficient to have only 100 measurements
[can-benchmark.git] / recvmmsg / plot.gp
1 # termsize 7cm,7cm
2 set grid
3
4 set xlabel "Frames [×1000]"
5 set ylabel "Time [ms]"
6 set key left reverse Left
7
8 fit a1*x+b1 "data" using 1:2 via a1, b1
9 fit a2*x+b2 "data" using 1:4 via a2, b2
10
11 set yrange [0:]
12
13 b1=b1/1000
14 b2=b2/1000
15
16 plot 'data' using ($1/1000):($2/1000) title 'read()', \
17      'data' using ($1/1000):($4/1000) title 'recvmmsg()', \
18      a1*x+b1 with lines lt 1 lc rgbcolor "#aa0000" lw 5 title "", \
19      a2*x+b2 with lines lt 1 lc rgbcolor "#00aa00" lw 5 title ""
20
21 # a1*x+b1 - a2*x-b2 = 0
22 # (a1-a2)*x = b2-b1
23 xeq = (b2-b1)/(a1-a2)
24 print "ar = ", a1
25 print "am = ", a2
26 print "ar/am = ", a1/a2
27 print "Intersection at x = ", xeq