]> rtime.felk.cvut.cz Git - can-benchmark.git/blob - recvmmsg/plot.gp
Finish recvmmsg() benchmark
[can-benchmark.git] / recvmmsg / plot.gp
1 set grid
2
3 set xlabel "Number of messages"
4 set ylabel "Time [{/Symbol m}s]"
5 set key left reverse Left
6
7 fit a1*x+b1 "data" using 1:2 via a1, b1
8 fit a2*x+b2 "data" using 1:4 via a2, b2
9
10 plot 'data' using 1:2 pt 7 ps 0.2 title 'read()', \
11      'data' using 1:4 pt 7 ps 0.2 title 'recvmmsg()', \
12      a1*x+b1 with lines lt 1 lc 1 lw 1 title "Linear fit for read()", \
13      a2*x+b2 with lines lt 1 lc 2 lw 1 title "Linear fit for recvmmsg()"
14
15 # a1*x+b1 - a2*x-b2 = 0
16 # (a1-a2)*x = b2-b1
17 xeq = (b2-b1)/(a1-a2)
18 print "ar = ", a1
19 print "am = ", a2
20 print "ar/am = ", a1/a2
21 print "Intersection at x = ", xeq