summaryrefslogtreecommitdiff
path: root/ubuntu/scripts
diff options
context:
space:
mode:
authorArthur She <arthur.she@linaro.org>2014-11-28 18:15:36 -0800
committerMilosz Wasilewski <milosz.wasilewski@linaro.org>2014-12-02 08:46:29 +0000
commit9509d817c11e51ea01140ecce105cb573cadd58b (patch)
tree17153a683cb3758ea439b07cdf9243a9c7b9e041 /ubuntu/scripts
parent8b697e04368a589acc43f4bc21f6dd533a6f1574 (diff)
Ubuntu: Add pmqtest.yaml
Start pairs of threads and measure the latency of interprocess communication with POSIX messages queues. Change-Id: Iab52c118fee1fed9fbcf32cc9e6f9354b474077d
Diffstat (limited to 'ubuntu/scripts')
-rwxr-xr-xubuntu/scripts/rt-tests-parser.sh39
1 files changed, 39 insertions, 0 deletions
diff --git a/ubuntu/scripts/rt-tests-parser.sh b/ubuntu/scripts/rt-tests-parser.sh
new file mode 100755
index 0000000..4d9b1c7
--- /dev/null
+++ b/ubuntu/scripts/rt-tests-parser.sh
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+LOG=$1
+
+# Find the last line number which starting with control character
+N=`grep -Pn "\x1b" ${LOG} | tail -n1 | cut -d':' -f1`
+# The rest of lines from #N is the final test result we want
+sed -i "s/\x1b\[[0-9]A//" ${LOG} # Remove the control code
+sed -n "${N},$ p" ${LOG} > tmp.log
+mv tmp.log ${LOG}
+
+sed "s/.*> //" ${LOG} | sed "s/^#/A/" > tmp.log
+
+grep "CPU" tmp.log > v.log
+grep -v "CPU" tmp.log > res.log
+while read l;
+do
+ k="`echo ${l} | cut -d: -f1`"
+ v="`echo ${l} | cut -d, -f3|sed 's/^ //'`"
+ eval ${k}=${v}
+ while read m;
+ do
+ eval sed -i "s/${k}/\$${k}/" res.log
+ done < res.log
+done < v.log
+while read l
+do
+ TC="`echo ${l} | cut -d',' -f1`"
+ R="`echo ${l} | sed 's/^CPU[0-9]*, //'`"
+ IFS=','
+ for c in ${R}
+ do
+ c="`echo $c|sed 's/^[ ]*//'`"
+ t="`echo ${c} | cut -d' ' -f1`"
+ v="`echo ${c} | cut -d' ' -f2`"
+ echo "${TC}_${t}: ${v} usec pass"
+ done
+ unset IFS
+done < res.log