generate document report
authorLaurent Mazet <mazet@softndesign.org>
Sat, 11 Oct 2025 19:07:02 +0000 (21:07 +0200)
committerLaurent Mazet <mazet@softndesign.org>
Sat, 11 Oct 2025 19:07:02 +0000 (21:07 +0200)
generatedoc.sh [new file with mode: 0755]
getname.sh [new file with mode: 0755]

diff --git a/generatedoc.sh b/generatedoc.sh
new file mode 100755 (executable)
index 0000000..465398b
--- /dev/null
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+base=$(cd $(dirname $0); pwd)
+
+echo "<html>"
+echo "<head><title>Appendix</title></head>"
+echo "<body>"
+
+for tab; do
+
+  test=$(echo $tab | sed 's/.tab//')
+  title=$($base/getname.sh -r $test)
+
+  echo "<h2>$title</h2>"
+
+  echo "<h3>Statistic summary</h3>"
+
+  echo "<table border=\"1\" cellpadding=\"5\" cellspacing=\"2\" width=\"100%\">"
+  echo "<thead><tr><th>Load<br>(%)</th><th>Minimum<br>(us)</th><th>Average<br>(us)</th><th>Maximun<br>(us)</th><th>Standard Dev.<br>(us)</th><th>25th %<br>(us)</th><th>Median<br>(us)</th><th>75th %<br>(us)</th></tr></thead>"
+  echo "<tbody>"
+  awk '{ printf "<tr>"; for (i=0; i<NF; i++) printf "<td>%s</td>", $(i+1); printf "</tr>\n" }' $tab
+  echo "</tbody>"
+  echo "</table>"
+
+  echo "<a href=\"$test.pdf\"><img src=\"$test.png\" width=\"80%\"/></a>"
+
+  for load in $(cat $tab | cut -f1 -d\ ); do
+    echo "<h3>Measures with load of $load%</h3>"
+    echo "<a href=\"$test-$load%-raw.pdf\"><img src=\"$test-$load%-raw.png\" width=\"49%\"/></a>"
+    echo "<a href=\"$test-$load%-hist.pdf\"><img src=\"$test-$load%-hist.png\" width=\"49%\"/></a>"
+  done
+
+done
+
+echo "</body>"
+echo "</html>"
diff --git a/getname.sh b/getname.sh
new file mode 100755 (executable)
index 0000000..d35e2de
--- /dev/null
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+base=$(cd $(dirname $0); pwd)
+
+case "$1" in
+-g)
+  for f in $base/*.exe; do
+    b=$(basename $f | sed 's/\.exe//')
+    m=$(awk -F\" '/message =/ {print $2}' $b.c)
+    [ "$m" ] && echo "  \"$m\") test=$b;;"
+  done
+  ;;
+-r)
+  awk -F\" '/test='$2';;/ {print $2}' $0
+  ;;
+*)
+  case "$*" in
+  "Clock accurency") test=clock;;
+  "Cycle latency") test=cycle;;
+  "Message queue latency") test=mq_lat;;
+  "Mutex latency") test=mutex;;
+  "Pipe latency") test=pipe_lat;;
+  "Semaphore latency") test=semaphore;;
+  "Thread (create) latency") test=thread_c;;
+  "Thread (create and join) latency") test=thread_c+j;;
+  "UDP socket latency") test=udp_lat;;
+  *) exit 1;;
+  esac
+  echo $test
+esac
+