From c64360d1edcd561ed85eeb8dfc75eb2ff06c96d3 Mon Sep 17 00:00:00 2001 From: Florian Fischer <florian.fischer@muhq.space> Date: Mon, 30 May 2022 11:15:53 +0200 Subject: [PATCH] add script to export the results as dataref --- export-ma-results-as-dataref.sh | 36 +++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 export-ma-results-as-dataref.sh diff --git a/export-ma-results-as-dataref.sh b/export-ma-results-as-dataref.sh new file mode 100755 index 0000000..d8350d2 --- /dev/null +++ b/export-ma-results-as-dataref.sh @@ -0,0 +1,36 @@ +#!/bin/sh +set -e + +RES_DIR="${1:-results/ma}" +THROUGHPUT_DIR="${RES_DIR}"/throughput +LATENCY_DIR="${RES_DIR}"/latency +LATENCY_RUN="2" +LATENCIES="latencies.${LATENCY_RUN}.csv" + +./parse_results.py "${THROUGHPUT_DIR}" --desc-stats median --dataref + +SERVER_STATS="total-scheduled-fibers-to-local total-scheduled-fibers-to-mpsc-queue \ + sleep-percentage total-next-fiber-hint-io total-next-fiber-stolen \ + total-next-io-fiber-stolen completer-reaped-completions" +./parse_server_stats.py "${THROUGHPUT_DIR}" --variables ${SERVER_STATS} --desc-stats mean \ + | sed 's|drefset[^/]*/|&throughput/|g' + +./plot_tail_latency.py --summarize --dataref "${LATENCY_DIR}"/*/$LATENCIES + +for d in "${LATENCY_DIR}"/*; do + [[ ! -d "${d}" ]] && continue + impl="$(basename "${d}")" + tail -2 "${d}"/${LATENCY_RUN}.*perf_energy.txt | while read -r line; do + val=$(echo "$line" | cut -d',' -f 1) + key=$(echo "$line" | cut -d',' -f 3) + echo "\drefset[unit=\unit{\joule}]{${impl}/latency/${key}}{${val}}" + done + + server_out="${d}/${LATENCY_RUN}.out" + for key in sleep-percentage hint-io next{,-io}-fiber-stolen; do + val="$(grep ${key} "${server_out}" | cut -d' ' -f 2)" + if [[ -n "${val}" ]]; then + echo "\drefset{${impl}/latency/${key}}{${val}}" + fi + done +done -- GitLab