Add normalised avrbench number suitable for markdown tables

The cumulative time for typical user tasks depends on the flash and EEPROM
size of the part. This commit computes a size-normalised time. Lower is
better. This avrbench number still depends on the part, but less so than
the cumulative time of the tasks.

The summary line is put in vertical bars to make creation of markdown
tables easier.
This commit is contained in:
stefanrueger
2024-02-27 14:04:09 +13:00
parent 3b567687a7
commit df3c67f2d0

View File

@@ -486,7 +486,11 @@ for (( p=0; p<$arraylength; p++ )); do
if [ $benchmark -eq 1 ]; then
bench_sum=$(echo "$bench_t_flwr $bench_t_flrd $bench_t_eewr $bench_t_eerd $bench_t_ce" | awk '{print $1+$2+$3+$4+$5}')
echo $bench_char "$(printf '%7.3f s' $bench_sum): benchmark for ${pgm_and_target[$p]}"
[[ $check_eeprom -eq 0 ]] \
&& bench_norm=$(echo "$bench_t_flwr $bench_t_flrd $flash_size" | awk '{print 10705*(($1+$2)/$3)}') \
|| bench_norm=$(echo "$bench_t_flwr $bench_t_flrd $flash_size $bench_t_eewr $bench_t_eerd $ee_size" | \
awk '{print 6789*(($1+$2)/$3 + ($4+$5)/(32*$6))}')
echo "|$bench_char|$(printf '%6.3f s' $bench_sum)|$(printf '%7.3f s' $bench_norm)|${pgm_and_target[$p]}|"
fi
if [ $fail == true ]; then