eval-latency.bash (1268B)
1 #/usr/bin/env bash 2 3 set -eu 4 5 mkdir -p plots 6 7 do_eval() { 8 e=$1 9 out=$2 10 for x in 0 50 100 150 200; do 11 awk -f ~/repos/gnunet/contrib/benchmark/collect.awk results/latency-$x/stats/gnunet-benchmark-urls-*.txt \ 12 | fgrep "$1" | fgrep "status 200" | awk -v x=$x '{ print x, $10/1000 }' 13 done | sort -n > plots/latency-$out.data 14 } 15 16 17 awk -f ~/repos/gnunet/contrib/benchmark/collect.awk results/latency-0/stats/gnunet-benchmark-urls-*.txt \ 18 | fgrep "status 200" | awk '{ print $2, $10/1000 }' > plots/latency-summary-0.data 19 20 awk -f ~/repos/gnunet/contrib/benchmark/collect.awk results/latency-100/stats/gnunet-benchmark-urls-*.txt \ 21 | fgrep "status 200" | awk '{ print $2, $10/1000 }' > plots/latency-summary-100.data 22 23 do_eval '/refresh/melt' 'refresh-melt' 24 do_eval '/refresh/reveal' 'refresh-reveal' 25 do_eval '/deposit' 'deposit' 26 do_eval '/reserve/withdraw' 'withdraw' 27 do_eval '/keys' 'keys' 28 29 awk -f ~/repos/gnunet/contrib/benchmark/collect.awk results/latency-*/stats/gnunet-benchmark-urls-*.txt \ 30 | fgrep "status 200" | awk '{ print $2, $16/1000 }' \ 31 > plots/req-sent.data 32 33 awk -f ~/repos/gnunet/contrib/benchmark/collect.awk results/latency-*/stats/gnunet-benchmark-urls-*.txt \ 34 | fgrep "status 200" | awk '{ print $2, $18/1000 }' \ 35 > plots/req-received.data