summaryrefslogtreecommitdiff
path: root/cdrom/tools/latencyTest/lats.sh
diff options
context:
space:
mode:
authorguest <guest@cba7306a-a4a0-4afd-bcb4-bd19f8a24309>2007-11-30 13:41:25 +0000
committerguest <guest@cba7306a-a4a0-4afd-bcb4-bd19f8a24309>2007-11-30 13:41:25 +0000
commiteacbf5bb4d57af21c731f41251015d3b991ad490 (patch)
tree477f43a79c75b400228a7c492f670a1c4886b5c3 /cdrom/tools/latencyTest/lats.sh
final version, initial import
git-svn-id: svn+ssh://mecka.net/home/svn/rtcorba-thesis@1 cba7306a-a4a0-4afd-bcb4-bd19f8a24309
Diffstat (limited to 'cdrom/tools/latencyTest/lats.sh')
-rwxr-xr-xcdrom/tools/latencyTest/lats.sh42
1 files changed, 42 insertions, 0 deletions
diff --git a/cdrom/tools/latencyTest/lats.sh b/cdrom/tools/latencyTest/lats.sh
new file mode 100755
index 0000000..acb93c4
--- /dev/null
+++ b/cdrom/tools/latencyTest/lats.sh
@@ -0,0 +1,42 @@
+#!/bin/bash
+#
+# file: lats.sh
+#
+# Simple bash script for parsing and evaluating a CSV file
+# (C) 2006 Jan Altenberg <tb10alj@tglx.de>
+#
+# modified 2006 by Manuel Traut <mail@manut.de>
+# - works with 2channels,
+# - parsing and calculating is now done by c++ application
+# - modified gnuplot parameters
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License Version
+# 2 as published by the Free Software Foundation.
+
+GNUPLOT=`which gnuplot`
+
+PLOT_FILE=plot.pnm
+
+RESULT_TMPFILEn=result0.txt
+cat $RESULT_TMPFILEn | sort -n > tmp.txt
+RESULT_TMPFILE=tmp.txt
+
+RESULT_TMPFILEm=result1.txt
+cat $RESULT_TMPFILEm | sort -n > tmp1.txt
+RESULT_TMPFILE1=tmp1.txt
+
+echo "Generating 2ch plot..."
+
+echo -e "set title \"latency histogram\"\n\
+set terminal pbm color\n\
+set xrange [0:*]\n\
+set yrange [0:*]\n\
+set xlabel\"latency [msec]\"\n\
+set ylabel\"occurrance\"\n\
+set output \"$PLOT_FILE\"\n\
+set boxwidth 0.006\n\
+set style fill solid 1 border\n\
+plot \"$RESULT_TMPFILE\" using 1:2 \"%lf%lf\" with boxes title \"high prioritized\", \"$RESULT_TMPFILE1\" using 1:2 \"%lf%lf\" with boxes title \"low prioritized\"" | gnuplot -persist
+
+display $PLOT_FILE