Add filter-time
authorMichal Sojka <sojkam1@fel.cvut.cz>
Sun, 12 Dec 2010 16:13:15 +0000 (17:13 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Sun, 12 Dec 2010 16:13:15 +0000 (17:13 +0100)
gw-tests/filter-time.sh [new file with mode: 0755]

diff --git a/gw-tests/filter-time.sh b/gw-tests/filter-time.sh
new file mode 100755 (executable)
index 0000000..e82803a
--- /dev/null
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+. lib.sh
+
+NO_GW_NEEDED=true
+
+main() {
+       ln -s ../filter/*.txt .
+}
+
+ids="0 $(seq 255 256 2047)"
+
+ADDITIONAL_PLOTS=detail
+
+plot_cmds() {
+    if [[ "$1" = detail ]]; then
+       range=0.36:0.8
+    else
+       range=0.05:100
+       echo "set logscale y"
+    fi
+    min=$(head -n 1 id-0-msgs.txt | awk '{ print $2 }')
+    cat <<EOF
+set title "Single GW job for all messages, no modifications"
+set grid xtics ytics mytics lw 1, lw 0.5
+set xlabel "Time [s]"
+set ylabel "Latency [ms]"
+plot [:] [$range] \\
+EOF
+    lt=1
+    for i in $ids; do
+       echo_plot "\"id-$i-msgs.txt\" using (\$2-$min):(1000*\$14) with points title \"Message id $i\""
+        lt=$((lt+1))
+    done
+}
+    
+test_end
+