From 73795b5ef493028c4feea16bd8659e2031a23d0d Mon Sep 17 00:00:00 2001 From: Laurent MAZET Date: Mon, 13 Oct 2025 10:47:19 +0200 Subject: [PATCH] fix and document report generation --- generatecandle.sh | 4 ++-- generatedoc.sh | 4 ++-- gettable.sh | 2 +- readme.md | 53 +++++++++++++++++++++++++++++++++++++++++++++++ test.sh | 2 +- 5 files changed, 59 insertions(+), 6 deletions(-) create mode 100644 readme.md diff --git a/generatecandle.sh b/generatecandle.sh index 040df9c..666de86 100755 --- a/generatecandle.sh +++ b/generatecandle.sh @@ -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 diff --git a/generatedoc.sh b/generatedoc.sh index 3181c32..fdf568e 100755 --- a/generatedoc.sh +++ b/generatedoc.sh @@ -25,13 +25,13 @@ for tab; do echo "" echo "" echo "" - awk '{ printf ""; for (i=1; i%s", $(i+1); printf "\n" }' $tab + awk '{ printf ""; for (i=0; i%s", $(i+1); printf "\n" }' $tab echo "" echo "
Load
(%)
Minimum
(us)
Average
(us)
Maximun
(us)
Standard Dev.
(us)
25th %
(us)
Median
(us)
75th %
(us)
" echo "
" - for load in $(cat $tab | cut -f1 -d\ ); do + for load in $(cat $tab | sed 's/%.*//'); do echo "

Measures with load of $load%

" echo "
" echo "" diff --git a/gettable.sh b/gettable.sh index 9e5e8d5..381c076 100755 --- a/gettable.sh +++ b/gettable.sh @@ -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 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 0d52a99..6b6c267 100755 --- 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; \ -- 2.30.2