From df3c67f2d0aba9ab4752978fe19a709841ff456c Mon Sep 17 00:00:00 2001 From: stefanrueger Date: Tue, 27 Feb 2024 14:04:09 +1300 Subject: [PATCH] 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. --- tools/test-avrdude | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/test-avrdude b/tools/test-avrdude index 0c207887..0e75a066 100755 --- a/tools/test-avrdude +++ b/tools/test-avrdude @@ -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