Commit 88293d75 authored by Florian Fischer's avatar Florian Fischer
Browse files

improve muhq-ma-plots.sh

* introduce a Makefile for the generated plots
* allow throughput and latency plots to be generated individually
* introduce new best plot including all runtimes and waitfd
* exclude the new computation 0us-100ms-0.5
parent b6fca3a4
......@@ -6,7 +6,11 @@ servers/tokio-echo/target
servers/*/echoserver
servers/libevent-cemer-thread/echoserver_threaded
plots/
plots/*
!plots/common.tex
!plots/ma
plots/ma/*
!plots/ma/Makefile
clients/sync_connect/sync_connect
clients/io_uring_connect/io_uring_connect
#!/usr/bin/env bash
set -e
set -ex
# Pretty fancy method to get reliable the absolute path of a shell
# script, *even if it is sourced*. Credits go to GreenFox on
# stackoverflow: http://stackoverflow.com/a/12197518/194894
pushd . >/dev/null
SCRIPTDIR="${BASH_SOURCE[0]}";
while([ -h "${SCRIPTDIR}" ]); do
cd "`dirname "${SCRIPTDIR}"`"
SCRIPTDIR="$(readlink "`basename "${SCRIPTDIR}"`")";
done
cd "`dirname "${SCRIPTDIR}"`" > /dev/null
SCRIPTDIR="`pwd`";
popd >/dev/null
if [ -z "$1" ]; then
DATA=results/ma
......@@ -7,62 +20,79 @@ else
DATA="$1"
fi
DATA="$(realpath "${DATA}")"
LATENCY_DATA="${DATA}/latency"
THROUGHPUT_DATA="${DATA}/throughput"
COMMON_EXCLUDE="-ix *lockless*"
PLOT="./plot.py ${COMMON_EXCLUDE}"
PLOT="${SCRIPTDIR}/plot.py ${COMMON_EXCLUDE}"
PLOT_LATENCY="./plot_tail_latency.py --plot bar-tikz"
LATENCIES="latencies.1.csv"
LATENCY_PLOT="${SCRIPTDIR}/plot_tail_latency.py --plot bar-tikz --"
LATENCIES="latencies.2.csv"
COMP="0us-100ms-0.5"
EXCLUDE_COMP="-ix *${COMP} *200us"
OUT=plots/ma
mkdir -p "$OUT"
pushd "$OUT" >/dev/null
plot_throughput() {
echo "generating throughput plots ..."
${PLOT} -o ma-register-iouring.tex -i emper-vanilla emper-not-register-iouring -- "$THROUGHPUT_DATA"
${PLOT} -o ma-linked-futures.tex -i emper-vanilla emper-linked-futures -- "$THROUGHPUT_DATA"
${PLOT} -o "$OUT"/ma-register-iouring.tex -i emper-vanilla emper-not-register-iouring -- "$THROUGHPUT_DATA"
${PLOT} -o "$OUT"/ma-linked-futures.tex -i emper-vanilla emper-linked-futures -- "$THROUGHPUT_DATA"
${PLOT} -o ma-emper.tex -i 'emper*' -- "$THROUGHPUT_DATA"
${PLOT} -o "$OUT"/ma-emper.tex -i 'emper*' -- "$THROUGHPUT_DATA"
${PLOT} -o ma-pipe.tex -i emper-vanilla '*pipe*' ${EXCLUDE_COMP} -- "$THROUGHPUT_DATA"
${PLOT} -o ma-pipe-delay.tex -i emper-vanilla-${COMP} '*pipe*'-${COMP} -- "$THROUGHPUT_DATA"
${PLOT} -o "$OUT"/ma-pipe.tex -i emper-vanilla '*pipe*' -ix '*0us-1ms' -- "$THROUGHPUT_DATA"
${PLOT} -o "$OUT"/ma-pipe-delay.tex -i emper-vanilla-0us-1ms '*pipe*0us-1ms' -- "$THROUGHPUT_DATA"
${PLOT} -o ma-waitfd.tex -i emper-vanilla '*waitfd*' ${EXCLUDE_COMP} -- "$THROUGHPUT_DATA"
${PLOT} -o ma-waitfd-delay.tex -i emper-vanilla-${COMP} '*waitfd*'-${COMP} -- "$THROUGHPUT_DATA"
${PLOT} -o "$OUT"/ma-waitfd.tex -i emper-vanilla '*waitfd*' -ix '*0us-1ms' -- "$THROUGHPUT_DATA"
${PLOT} -o "$OUT"/ma-waitfd-delay.tex -i emper-vanilla-0us-1ms '*waitfd*0us-1ms*' -- "$THROUGHPUT_DATA"
${PLOT} -o ma-stealing.tex -i emper-vanilla '*io-stealing*' ${EXCLUDE_COMP} -- "$THROUGHPUT_DATA"
${PLOT} -o ma-stealing-delay.tex -i emper-{vanilla,*stealing}*-${COMP} -- "$THROUGHPUT_DATA"
${PLOT} -o "$OUT"/ma-stealing.tex -i emper-vanilla '*io-stealing*' -ix '*0us-1ms' -- "$THROUGHPUT_DATA"
${PLOT} -o "$OUT"/ma-stealing-delay.tex -i '*vanilla*0us-1ms' '*stealing*0us-1ms' -- "$THROUGHPUT_DATA"
${PLOT} -o ma-notification.tex -i emper-vanilla '*notification*' ${EXCLUDE_COMP} -- "$THROUGHPUT_DATA"
${PLOT} -o ma-notification-delay.tex -i emper-vanilla-${COMP} '*notification*'-${COMP} -- "$THROUGHPUT_DATA"
${PLOT} -o "$OUT"/ma-notification.tex -i emper-vanilla '*notification*' -ix '*0us-1ms' -- "$THROUGHPUT_DATA"
${PLOT} -o "$OUT"/ma-notification-delay.tex -i '*notification*0us-1ms' -- "$THROUGHPUT_DATA"
${PLOT} -o ma-base-strategies.tex -i emper-{vanilla,simple-arch*,pipe,waitfd} ${EXCLUDE_COMP} -- "$THROUGHPUT_DATA"
${PLOT} -o ma-strategies.tex -i emper-vanilla '*pipe*' '*waitfd*' ${EXCLUDE_COMP} -- "$THROUGHPUT_DATA"
${PLOT} -o ma-strategies-delay.tex -i emper-vanilla-${COMP} {*pipe*,*waitfd*}-${COMP} -- "$THROUGHPUT_DATA"
${PLOT} -o "$OUT"/ma-base-strategies.tex -i emper-vanilla 'emper-simple-arch*' emper-pipe emper-waitfd -ix '*0us-1ms' -- "$THROUGHPUT_DATA"
${PLOT} -o "$OUT"/ma-strategies.tex -i emper-vanilla '*pipe*' '*waitfd*' -ix '*0us-1ms' -- "$THROUGHPUT_DATA"
${PLOT} -o "$OUT"/ma-strategies-delay.tex -i '*vanilla*0us-1ms' '*pipe*0us-1ms' '*waitfd*-0us-1ms' -- "$THROUGHPUT_DATA"
${PLOT} -o ma-all.tex -- "$THROUGHPUT_DATA"
${PLOT} -o ma-no-delay.tex ${EXCLUDE_COMP} -- "$THROUGHPUT_DATA"
${PLOT} -o ma-delay.tex -i '*1*ms' -- "$THROUGHPUT_DATA"
${PLOT} -o "$OUT"/ma-all.tex -- "$THROUGHPUT_DATA"
${PLOT} -o "$OUT"/ma-no-delay.tex -ix '*1ms' -- "$THROUGHPUT_DATA"
${PLOT} -o "$OUT"/ma-delay.tex -i '*1ms' -- "$THROUGHPUT_DATA"
${PLOT} -o ma-runtimes.tex -i emper-vanilla go tokio -- "$THROUGHPUT_DATA"
${PLOT} -o ma-runtimes-delay.tex -i {*vanilla,go,tokio}*200us -- "$THROUGHPUT_DATA"
${PLOT} -o "$OUT"/ma-runtimes.tex -i emper-vanilla go tokio -- "$THROUGHPUT_DATA"
${PLOT} -o "$OUT"/ma-runtimes-delay.tex -i '*vanilla*200us' 'go*200us' 'tokio*200us' -- "$THROUGHPUT_DATA"
${PLOT} -o ma-best.tex -i emper-vanilla emper-waitfd go tokio -- "$THROUGHPUT_DATA"
${PLOT} -o ma-best-delay.tex -i {*vanilla,*waitfd,go,tokio}*200us -- "$THROUGHPUT_DATA"
}
${PLOT_LATENCY} ${LATENCY_DATA}/{emper-vanilla,go,tokio}-200us/$LATENCIES > "$OUT"/ma-runtime-latency.tex
plot_latency() {
echo "generating latency plots ..."
${LATENCY_PLOT} ${LATENCY_DATA}/{emper-vanilla,go,tokio}-200us/$LATENCIES > ma-runtime-latency.tex
${LATENCY_PLOT} ${LATENCY_DATA}/{emper-vanilla,emper-waitfd,go,tokio}-200us/$LATENCIES > ma-comparision-latency.tex
${PLOT_LATENCY} ${LATENCY_DATA}/emper-{waitfd,pipe,vanilla}-0us-1ms/$LATENCIES > "$OUT"/ma-strategy-latency.tex
${LATENCY_PLOT} ${LATENCY_DATA}/emper-{waitfd,pipe,vanilla}-${COMP}/$LATENCIES > ma-strategy-latency.tex
${PLOT_LATENCY} ${LATENCY_DATA}/emper-{pipe*,vanilla}-0us-1ms/$LATENCIES > "$OUT"/ma-pipe-latency.tex
${PLOT_LATENCY} ${LATENCY_DATA}/emper-{waitfd*,notification*,vanilla}-0us-1ms/$LATENCIES > "$OUT"/ma-waitfd-latency.tex
${LATENCY_PLOT} ${LATENCY_DATA}/emper-{pipe*,vanilla}-${COMP}/$LATENCIES > ma-pipe-latency.tex
${LATENCY_PLOT} ${LATENCY_DATA}/emper-{waitfd*,io-notification*,vanilla}-${COMP}/$LATENCIES > ma-waitfd-latency.tex
}
cd "$OUT"
[[ "${PLOT_THROUGHPUT}" != "false" ]] && plot_throughput
[[ "${PLOT_LATENCY}" != "false" ]] && plot_latency
# Create the common.tex symlink
if [ ! -e common.tex ]; then
ln -s ../common.tex ./
fi
for f in *.tex
do
[[ "${f}" = common.tex ]] && continue
pdflatex "${f}"
done
# Build MA plots
make
popd >/dev/null
PLOTS=$(filter-out common.tex, $(wildcard *.tex))
PDFS=$(PLOTS:.tex=.pdf)
.PHONY: parallel
parallel:
$(MAKE) -j `nproc` -l `nproc` all
.PHONY:
all: $(PDFS)
%.pdf: %.tex common.tex
pdflatex $<
.PHONY:
clean:
rm -rf *.pdf *.aux *.log
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment