cyclonedds/examples/perfscript/throughput-test-plot
Erik Boasson af19c5681c Use ddsperf in perf scripts and update README
* the scripted throughput test originally used for the throughput graph
  in the README now uses ddsperf;

* a scripted latency test has been added;

* updated the README with the results of these tests (and so now gives
  easy access not only to throughput, but also to latency and memory
  usage, as well as to latency over GbE.

Signed-off-by: Erik Boasson <eb@ilities.com>
2019-08-02 09:53:36 +02:00

55 lines
1.4 KiB
Bash
Executable file

#!/bin/bash
`dirname $0`/throughput-test-extract "$@" > data.txt
gnuplot <<\EOF
set term pngcairo size 1024,768
set output "throughput-async-listener-rate.png"
set st d lp
set st li 1 lw 2
set st li 2 lw 2
set st li 3 lw 2
set multiplot
set logscale xyy2
set title "Throughput"
set ylabel "[Mbps]"
set ytics (100,200,300,400,500,600,700,800,900,1000)
set grid xtics ytics mytics
set xlabel "payload size [bytes]"
# sample rate in data.txt is in kS/s
# GbE bandwidth in data.txt is in %, so 100% => 1000 Mbps
set key at graph 1, 0.9
p "data.txt" u 1:3 ti "payload", "" u 1:(10*$5) ti "GbE bandwidth"
set ytics auto
set key default
unset xlabel
unset title
set grid nomytics
set ylabel "[M sample/s]"
set origin .3, .1
set size .6, .6
clear
p "data.txt" u 1:($2/1e3) ti "rate"
unset multiplot
unset origin
unset size
unset logscale
set logscale x
set output "throughput-async-listener-memory.png"
set title "Throughput: memory"
set ylabel "RSS [MB]"
set xlabel "payload size [bytes]"
p "data.txt" u 1:6 ti "publisher", "" u 1:7 ti "subscriber"
unset logscale
set logscale x
set output "throughput-async-listener-cpu.png"
set title "Throughput: CPU"
set ylabel "CPU [%]"
set xlabel "payload size [bytes]"
p "data.txt" u 1:8 ti "publisher (pub thread)", "" u 1:9 ti "publisher (recvUC thread)", "" u 1:10 ti "subscriber (dq.user thread)", "" u 1:11 ti "subscriber (recvUC thread)"
EOF