]> rtime.felk.cvut.cz Git - can-benchmark.git/blob - gw-tests/pc.sh
Change bisect-run script
[can-benchmark.git] / gw-tests / pc.sh
1 #!/bin/bash
2
3 . lib.sh
4
5 main() {
6     latester -d can0 -d can1 -c $COUNT $(traffic_and_length 2) -n len2
7     latester -d can0 -d can1 -c $COUNT $(traffic_and_length 4) -n len4
8     latester -d can0 -d can1 -c $COUNT $(traffic_and_length 6) -n len6
9     latester -d can0 -d can1 -c $COUNT $(traffic_and_length 8) -n len8
10 }
11
12 plot_cmds() {
13     max=0.5
14     if [ $traffic = "flood" ]; then max=35; fi
15
16     cat <<EOF
17 set title "No GW, two interfaces in PC (Latency = t_{kernel RX} - t_{before send} - t_{TX length})"
18 set logscale y
19 set grid
20 set xlabel "Latency [ms]"
21 set ylabel "Latency profile [frames]"
22 plot [0.01:$max] [1:$COUNT] \\
23           "len2-hist.txt" with lp lt 1 title "2 byte messages", \\
24           "len4-hist.txt" with lp lt 2 title "4 byte messages", \\
25           "len6-hist.txt" with lp lt 3 title "6 byte messages", \\
26           "len8-hist.txt" with lp lt 4 title "8 byte messages"
27 EOF
28 }
29     
30 test_end
31