fix and document report generation
authorLaurent MAZET <laurent.mazet@thalesgroup.com>
Mon, 13 Oct 2025 08:47:19 +0000 (10:47 +0200)
committerLaurent MAZET <laurent.mazet@thalesgroup.com>
Mon, 13 Oct 2025 08:47:19 +0000 (10:47 +0200)
generatecandle.sh
generatedoc.sh
gettable.sh
readme.md [new file with mode: 0644]
test.sh

index 040df9c3ef5cabe88c07152f4ba6c69c09b806f0..666de86ddc3acd8e4a7518539dbac7d27403f403 100755 (executable)
@@ -17,8 +17,8 @@ for csv; do
       2) core="2 cores";;
       esac
 
-      awk -F, '$1 == "'"$title"'" && $2 == '$dcore' { sub (/[^,]*,/, ""); gsub (/,/, " "); print }' $csv > $name.tab
-      if [ -s $name.tab ]; then
+      awk -F, '$1 == "'"$title"'" && $2 == '$dcore' { $1=$2=""; print }' $csv | sed 's/  //' | sort -n > $name.tab
+      if [ -s "$name.tab" ]; then
         cat $base/candles.gp | \
           m4 -D CORE="$core" -D DATA="$name.tab" -D TITLE="$title" | \
           gnuplot > $name.pdf
index 3181c322d480428508f195960b2a475406497ebf..fdf568e987539de2716514feed128164f1e61a58 100755 (executable)
@@ -25,13 +25,13 @@ for tab; do
   echo "<table border=\"1\" cellpadding=\"5\" cellspacing=\"2\" width=\"100%\">"
   echo "<thead><tr><th width=\"12%\">Load<br>(%)</th><th width=\"12%\">Minimum<br>(us)</th><th width=\"12%\">Average<br>(us)</th><th width=\"12%\">Maximun<br>(us)</th><th width=\"12%\">Standard Dev.<br>(us)</th><th width=\"12%\">25th %<br>(us)</th><th width=\"12%\">Median<br>(us)</th><th width=\"12%\">75th %<br>(us)</th></tr></thead>"
   echo "<tbody>"
-  awk '{ printf "<tr>"; for (i=1; i<NF; i++) printf "<td>%s</td>", $(i+1); printf "</tr>\n" }' $tab
+  awk '{ printf "<tr>"; for (i=0; i<NF; i++) printf "<td>%s</td>", $(i+1); printf "</tr>\n" }' $tab
   echo "</tbody>"
   echo "</table>"
 
   echo "<div><a href=\"$test-${dcore}k.pdf\"><img src=\"$test-${dcore}k.png\" width=\"80%\"/></a></div>"
 
-  for load in $(cat $tab | cut -f1 -d\ ); do
+  for load in $(cat $tab | sed 's/%.*//'); do
     echo "<h3>Measures with load of $load%</h3>"
     echo "<div>"
     echo "<a href=\"$test-${dcore}k-${load}%-raw.pdf\"><img src=\"$test-${dcore}k-${load}%-raw.png\" width=\"49%\"/></a>"
index 9e5e8d54dc08b3937fc6677758c14955c8d50ce8..381c0768ce3d5635d8bf7d3df1730eb12bb8988d 100755 (executable)
@@ -11,7 +11,7 @@ for exe in *.exe; do
     for cpu in $(seq 0 $nbcpu); do
       load=$(expr $cpu \* 100 / $nbcpu)
       name=${test}-${core}k-${load}%
-      [ -f $name.log ] && awk -f $base/gettable.awk -v nohead=1 $name.log
+      [ -f "$name.log" ] && awk -f $base/gettable.awk -v nohead=1 $name.log
     done
   done
 done
diff --git a/readme.md b/readme.md
new file mode 100644 (file)
index 0000000..e15f463
--- /dev/null
+++ b/readme.md
@@ -0,0 +1,53 @@
+
+
+# Build for target
+
+## For 32 bits architecture
+
+CC=arm-linux-gnueabihf-gcc LDFLAGS="-static -static-libgcc" make
+
+## For 64 bits architecture
+
+### On x86 host
+
+CC=aarch64-linux-gnu-gcc LDFLAGS="-static -static-libgcc" make
+
+### On Rasbberry Pi
+
+LDFLAGS="-static -static-libgcc" make
+
+# Run test on target
+
+check correctness of ip addresses (host and target)
+
+copy synch.sh on target
+
+execute on target
+
+  ./sync.sh
+  ./test.sh
+  ./resync.sh
+
+# Result exploitation
+
+## Generate spreadsheet
+
+Extract data into a new directory
+
+  mkdir data
+  cd data
+  tar xvzf ../result-20251008-1534.tgz
+  ../gettable.awk *.log > result.csv
+  LANG=C libreoffice --convert-to ods result.csv
+
+## Generate plots
+
+  ../generateplot.sh *.dat
+  ../generatecandle.sh result.csv
+  for f in *.pdf; do pdftoppm -png $f > ${f/pdf/png}; done
+
+## Generate report
+
+  ../generatedoc.sh *.tab > report.html
+  #libreoffice --convert-to odt report.html
+  LANG=C pandoc report.html -t odt -o report.odt
diff --git a/test.sh b/test.sh
index 0d52a9936f15948384e18cb7735504c17ccaa8e6..6b6c2677be3b86d6d8ff7a095ca83e762608c55f 100755 (executable)
--- a/test.sh
+++ b/test.sh
@@ -10,7 +10,7 @@ run() {
   for exe in *.exe; do
     test=$(echo $exe | sed 's/\.exe//')
     name=$test-${dcore}k-${load}%
-    echo "\033[0;1mTest $test\033[0;0m"
+    echo -e "\033[0;1mTest $test\033[0;0m"
     ./getinfo.sh | tee $name.log
     echo "CPU load: $load% ($lcpu/$nbcpu)" | tee -a $name.log
     { ./$exe -d 1 -k $dcore -n 10000 -s -o $name.dat | tee -a $name.log; \