diff --git a/.meta/dietpi-survey_report b/.meta/dietpi-survey_report index 2041538a9a..86627c5ca2 100644 --- a/.meta/dietpi-survey_report +++ b/.meta/dietpi-survey_report @@ -7,12 +7,12 @@ G_HW_MODEL_MAX=100 aBENCH_INDEX=() -for (( i=0; i<$G_HW_MODEL_MAX; i++ )) -do +# for (( i=0; i<$G_HW_MODEL_MAX; i++ )) +# do - aBENCH_INDEX[$i]=0 + # aBENCH_INDEX[$i]=0 -done +# done #[$HW_MODEL,${aBENCH_INDEX[$HW_MODEL]}] declare -A aBENCH_CPU @@ -25,9 +25,33 @@ declare -A aBENCH_CPU_TEMP_END #Results BC_SCALE=1 -BENCH_RESULT_CPU_MIN=() -BENCH_RESULT_CPU_MAX=() -BENCH_RESULT_CPU_AVG=() +aBENCH_RESULT_CPU_MIN=() +aBENCH_RESULT_CPU_MAX=() +aBENCH_RESULT_CPU_AVG=() + +aBENCH_RESULT_ROOTFS_WRITE_MIN=() +aBENCH_RESULT_ROOTFS_WRITE_MAX=() +aBENCH_RESULT_ROOTFS_WRITE_AVG=() + +aBENCH_RESULT_ROOTFS_READ_MIN=() +aBENCH_RESULT_ROOTFS_READ_MAX=() +aBENCH_RESULT_ROOTFS_READ_AVG=() + +aBENCH_RESULT_RAM_WRITE_MIN=() +aBENCH_RESULT_RAM_WRITE_MAX=() +aBENCH_RESULT_RAM_WRITE_AVG=() + +aBENCH_RESULT_RAM_READ_MIN=() +aBENCH_RESULT_RAM_READ_MAX=() +aBENCH_RESULT_RAM_READ_AVG=() + +aBENCH_RESULT_CPU_TEMP_START_MIN=() +aBENCH_RESULT_CPU_TEMP_START_MAX=() +aBENCH_RESULT_CPU_TEMP_START_AVG=() + +aBENCH_RESULT_CPU_TEMP_END_MIN=() +aBENCH_RESULT_CPU_TEMP_END_MAX=() +aBENCH_RESULT_CPU_TEMP_END_AVG=() #----------------------------------------------------------- #Globals - Survey @@ -273,7 +297,7 @@ aSOFTWARE_NAME6_11=() for i in ${!aSOFTWARE_NAME6_10[@]} do - aSOFTWARE_NAME6_11[$i]="${aSOFTWARE_NAME6_10[$i]}" + aSOFTWARE_NAME6_11[$i]="${aSOFTWARE_NAME6_10[$i]}" done @@ -282,7 +306,7 @@ aSOFTWARE_NAME6_12=() for i in ${!aSOFTWARE_NAME6_11[@]} do - aSOFTWARE_NAME6_12[$i]="${aSOFTWARE_NAME6_11[$i]}" + aSOFTWARE_NAME6_12[$i]="${aSOFTWARE_NAME6_11[$i]}" done aSOFTWARE_NAME6_12[2]='NULL' # CurlTMPFS @@ -293,7 +317,7 @@ aSOFTWARE_NAME6_13=() for i in ${!aSOFTWARE_NAME6_12[@]} do - aSOFTWARE_NAME6_13[$i]="${aSOFTWARE_NAME6_12[$i]}" + aSOFTWARE_NAME6_13[$i]="${aSOFTWARE_NAME6_12[$i]}" done aSOFTWARE_NAME6_13[2]='Folding@Home' @@ -304,7 +328,7 @@ aSOFTWARE_NAME6_14=() for i in ${!aSOFTWARE_NAME6_13[@]} do - aSOFTWARE_NAME6_14[$i]="${aSOFTWARE_NAME6_13[$i]}" + aSOFTWARE_NAME6_14[$i]="${aSOFTWARE_NAME6_13[$i]}" done aSOFTWARE_NAME6_14[38]='FreshRSS' @@ -314,7 +338,7 @@ aSOFTWARE_NAME6_15=() for i in ${!aSOFTWARE_NAME6_14[@]} do - aSOFTWARE_NAME6_15[$i]="${aSOFTWARE_NAME6_14[$i]}" + aSOFTWARE_NAME6_15[$i]="${aSOFTWARE_NAME6_14[$i]}" done aSOFTWARE_NAME6_12[148]='myMPD' @@ -347,7 +371,7 @@ done cp -R /home/dietpi-survey/survey /tmp/dietpi-survey_report #DEBUG | ONLY MY UPLOAD for testing -for file in /tmp/dietpi-survey_report/715d1a02-448b-4c12-bfee-c8fcd817fd32.* +for file in /tmp/dietpi-survey_report/*.test do # Filled and empty survey files @@ -367,13 +391,19 @@ do # - Add bench to array if [[ $BENCH_HW_MODEL ]]; then + if [[ ! ${aBENCH_INDEX[$BENCH_HW_MODEL]} ]]; then + + aBENCH_INDEX[$BENCH_HW_MODEL]=0 + + fi + aBENCH_CPU[$BENCH_HW_MODEL,${aBENCH_INDEX[$BENCH_HW_MODEL]}]=$BENCH_CPU aBENCH_ROOTFS_WRITE[$BENCH_HW_MODEL,${aBENCH_INDEX[$BENCH_HW_MODEL]}]=$BENCH_ROOTFS_WRITE aBENCH_ROOTFS_READ[$BENCH_HW_MODEL,${aBENCH_INDEX[$BENCH_HW_MODEL]}]=$BENCH_ROOTFS_READ aBENCH_RAM_WRITE[$BENCH_HW_MODEL,${aBENCH_INDEX[$BENCH_HW_MODEL]}]=$BENCH_RAM_WRITE aBENCH_RAM_READ[$BENCH_HW_MODEL,${aBENCH_INDEX[$BENCH_HW_MODEL]}]=$BENCH_RAM_READ - aBENCH_CPU_TEMP_START=[$BENCH_HW_MODEL,${aBENCH_INDEX[$BENCH_HW_MODEL]}]=$BENCH_CPU_TEMP_START - aBENCH_CPU_TEMP_END=[$BENCH_HW_MODEL,${aBENCH_INDEX[$BENCH_HW_MODEL]}]=$BENCH_CPU_TEMP_END + aBENCH_CPU_TEMP_START[$BENCH_HW_MODEL,${aBENCH_INDEX[$BENCH_HW_MODEL]}]=$BENCH_CPU_TEMP_START + aBENCH_CPU_TEMP_END[$BENCH_HW_MODEL,${aBENCH_INDEX[$BENCH_HW_MODEL]}]=$BENCH_CPU_TEMP_END ((aBENCH_INDEX[$BENCH_HW_MODEL]++)) unset BENCH_HW_MODEL @@ -460,72 +490,201 @@ done for (( i=0; i<$G_HW_MODEL_MAX; i++ )) do - #init results - BENCH_RESULT_CPU_MIN[$i]=10000 - BENCH_RESULT_CPU_MAX[$i]=0 - BENCH_RESULT_CPU_AVG[$i]=0 + if [[ ${aBENCH_INDEX[$i]} ]]; then - #echo ${aBENCH_INDEX[$i]} - for (( j=0; j<${aBENCH_INDEX[$i]}; j++ )) - do + #init results + aBENCH_RESULT_CPU_MIN[$i]=10000 + aBENCH_RESULT_CPU_MAX[$i]=0 + aBENCH_RESULT_CPU_AVG[$i]=0 - echo ${aBENCH_CPU[$i,$j]} - if (( $(bc -l <<< "scale=$BC_SCALE; ${aBENCH_CPU[$i,$j]} < ${BENCH_RESULT_CPU_MIN[$i]}") )); then + aBENCH_RESULT_ROOTFS_WRITE_MIN[$i]=10000 + aBENCH_RESULT_ROOTFS_WRITE_MAX[$i]=0 + aBENCH_RESULT_ROOTFS_WRITE_AVG[$i]=0 - BENCH_RESULT_CPU_MIN[$i]=${aBENCH_CPU[$i,$j]} + aBENCH_RESULT_ROOTFS_READ_MIN[$i]=10000 + aBENCH_RESULT_ROOTFS_READ_MAX[$i]=0 + aBENCH_RESULT_ROOTFS_READ_AVG[$i]=0 - fi - if (( $(bc -l <<< "scale=$BC_SCALE; ${aBENCH_CPU[$i,$j]} > ${BENCH_RESULT_CPU_MAX[$i]}") )); then + aBENCH_RESULT_RAM_WRITE_MIN[$i]=10000 + aBENCH_RESULT_RAM_WRITE_MAX[$i]=0 + aBENCH_RESULT_RAM_WRITE_AVG[$i]=0 - BENCH_RESULT_CPU_MAX[$i]=${aBENCH_CPU[$i,$j]} + aBENCH_RESULT_RAM_READ_MIN[$i]=10000 + aBENCH_RESULT_RAM_READ_MAX[$i]=0 + aBENCH_RESULT_RAM_READ_AVG[$i]=0 - fi + aBENCH_RESULT_CPU_TEMP_START_MIN[$i]=10000 + aBENCH_RESULT_CPU_TEMP_START_MAX[$i]=0 + aBENCH_RESULT_CPU_TEMP_START_AVG[$i]=0 - # - Count up averages - BENCH_RESULT_CPU_AVG[$i]=$(bc -l <<< "${aBENCH_CPU[$i,$j]} + ${BENCH_RESULT_CPU_AVG[$i]}") + aBENCH_RESULT_CPU_TEMP_END_MIN[$i]=10000 + aBENCH_RESULT_CPU_TEMP_END_MAX[$i]=0 + aBENCH_RESULT_CPU_TEMP_END_AVG[$i]=0 - # - DEBUG - echo ${aBENCH_ROOTFS_WRITE[$i,$j]} - echo ${aBENCH_ROOTFS_READ[$i,$j]} - echo ${aBENCH_RAM_WRITE[$i,$j]} - echo ${aBENCH_RAM_READ[$i,$j]} - echo ${aBENCH_CPU_TEMP_START[$i,$j]} - echo ${aBENCH_CPU_TEMP_END[$i,$j]} - # - DEBUG + #echo ${aBENCH_INDEX[$i]} + for (( j=0; j<${aBENCH_INDEX[$i]}; j++ )) + do - # - Work out averages - if (( $j == ${aBENCH_INDEX[$i]} - 1 )); then + echo -e "aBENCH_CPU[$i,$j] ${aBENCH_CPU[$i,$j]}" + if (( $(bc -l <<< "scale=$BC_SCALE; ${aBENCH_CPU[$i,$j]} < ${aBENCH_RESULT_CPU_MIN[$i]}") )); then - BENCH_RESULT_CPU_AVG[$i]=$(bc -l <<< "scale=$BC_SCALE; ${BENCH_RESULT_CPU_AVG[$i]} / ${aBENCH_INDEX[$i]}") + aBENCH_RESULT_CPU_MIN[$i]=${aBENCH_CPU[$i,$j]} - #DEBUG - echo -e "BENCH_RESULT_CPU_AVG $i = ${BENCH_RESULT_CPU_AVG[$i]}" - #DEBUG + fi + if (( $(bc -l <<< "scale=$BC_SCALE; ${aBENCH_CPU[$i,$j]} > ${aBENCH_RESULT_CPU_MAX[$i]}") )); then - fi + aBENCH_RESULT_CPU_MAX[$i]=${aBENCH_CPU[$i,$j]} - done + fi -done + # - Count up averages + aBENCH_RESULT_CPU_AVG[$i]=$(bc -l <<< "${aBENCH_CPU[$i,$j]} + ${aBENCH_RESULT_CPU_AVG[$i]}") + + echo -e "aBENCH_ROOTFS_WRITE[$i,$j] ${aBENCH_ROOTFS_WRITE[$i,$j]}" + if (( $(bc -l <<< "scale=$BC_SCALE; ${aBENCH_ROOTFS_WRITE[$i,$j]} < ${aBENCH_RESULT_ROOTFS_WRITE_MIN[$i]}") )); then + + aBENCH_RESULT_ROOTFS_WRITE_MIN[$i]=${aBENCH_ROOTFS_WRITE[$i,$j]} + + fi + if (( $(bc -l <<< "scale=$BC_SCALE; ${aBENCH_ROOTFS_WRITE[$i,$j]} > ${aBENCH_RESULT_ROOTFS_WRITE_MAX[$i]}") )); then + + aBENCH_RESULT_ROOTFS_WRITE_MAX[$i]=${aBENCH_ROOTFS_WRITE[$i,$j]} + + fi + + # - Count up averages + aBENCH_RESULT_ROOTFS_WRITE_AVG[$i]=$(bc -l <<< "${aBENCH_ROOTFS_WRITE[$i,$j]} + ${aBENCH_RESULT_ROOTFS_WRITE_AVG[$i]}") + + echo -e "aBENCH_ROOTFS_READ[$i,$j] ${aBENCH_ROOTFS_READ[$i,$j]}" + if (( $(bc -l <<< "scale=$BC_SCALE; ${aBENCH_ROOTFS_READ[$i,$j]} < ${aBENCH_RESULT_ROOTFS_READ_MIN[$i]}") )); then + + aBENCH_RESULT_ROOTFS_READ_MIN[$i]=${aBENCH_ROOTFS_READ[$i,$j]} + + fi + if (( $(bc -l <<< "scale=$BC_SCALE; ${aBENCH_ROOTFS_READ[$i,$j]} > ${aBENCH_RESULT_ROOTFS_READ_MAX[$i]}") )); then + + aBENCH_RESULT_ROOTFS_READ_MAX[$i]=${aBENCH_ROOTFS_READ[$i,$j]} + + fi + + # - Count up averages + aBENCH_RESULT_ROOTFS_READ_AVG[$i]=$(bc -l <<< "${aBENCH_ROOTFS_READ[$i,$j]} + ${aBENCH_RESULT_ROOTFS_READ_AVG[$i]}") + + echo -e "aBENCH_RAM_WRITE[$i,$j] ${aBENCH_RAM_WRITE[$i,$j]}" + if (( $(bc -l <<< "scale=$BC_SCALE; ${aBENCH_RAM_WRITE[$i,$j]} < ${aBENCH_RESULT_RAM_WRITE_MIN[$i]}") )); then + + aBENCH_RESULT_RAM_WRITE_MIN[$i]=${aBENCH_RAM_WRITE[$i,$j]} + + fi + if (( $(bc -l <<< "scale=$BC_SCALE; ${aBENCH_RAM_WRITE[$i,$j]} > ${aBENCH_RESULT_RAM_WRITE_MAX[$i]}") )); then + + aBENCH_RESULT_RAM_WRITE_MAX[$i]=${aBENCH_RAM_WRITE[$i,$j]} + + fi + + # - Count up averages + aBENCH_RESULT_RAM_WRITE_AVG[$i]=$(bc -l <<< "${aBENCH_RAM_WRITE[$i,$j]} + ${aBENCH_RESULT_RAM_WRITE_AVG[$i]}") + + echo -e "aBENCH_RAM_READ[$i,$j] ${aBENCH_RAM_READ[$i,$j]}" + if (( $(bc -l <<< "scale=$BC_SCALE; ${aBENCH_RAM_READ[$i,$j]} < ${aBENCH_RESULT_RAM_READ_MIN[$i]}") )); then -#DEBUG -exit -#DEBUG + aBENCH_RESULT_RAM_READ_MIN[$i]=${aBENCH_RAM_READ[$i,$j]} -cat << _EOF_ > /var/www/survey/index.html + fi + if (( $(bc -l <<< "scale=$BC_SCALE; ${aBENCH_RAM_READ[$i,$j]} > ${aBENCH_RESULT_RAM_READ_MAX[$i]}") )); then + + aBENCH_RESULT_RAM_READ_MAX[$i]=${aBENCH_RAM_READ[$i,$j]} + + fi + + # - Count up averages + aBENCH_RESULT_RAM_READ_AVG[$i]=$(bc -l <<< "${aBENCH_RAM_READ[$i,$j]} + ${aBENCH_RESULT_RAM_READ_AVG[$i]}") + + echo -e "aBENCH_CPU_TEMP_START[$i,$j] ${aBENCH_CPU_TEMP_START[$i,$j]}" + if (( $(bc -l <<< "scale=$BC_SCALE; ${aBENCH_CPU_TEMP_START[$i,$j]} < ${aBENCH_RESULT_CPU_TEMP_START_MIN[$i]}") )); then + + aBENCH_RESULT_CPU_TEMP_START_MIN[$i]=${aBENCH_CPU_TEMP_START[$i,$j]} + + fi + if (( $(bc -l <<< "scale=$BC_SCALE; ${aBENCH_CPU_TEMP_START[$i,$j]} > ${aBENCH_RESULT_CPU_TEMP_START_MAX[$i]}") )); then + + aBENCH_RESULT_CPU_TEMP_START_MAX[$i]=${aBENCH_CPU_TEMP_START[$i,$j]} + + fi + + # - Count up averages + aBENCH_RESULT_CPU_TEMP_START_AVG[$i]=$(bc -l <<< "${aBENCH_CPU_TEMP_START[$i,$j]} + ${aBENCH_RESULT_CPU_TEMP_START_AVG[$i]}") + + echo -e "aBENCH_CPU_TEMP_END[$i,$j] ${aBENCH_CPU_TEMP_END[$i,$j]}" + if (( $(bc -l <<< "scale=$BC_SCALE; ${aBENCH_CPU_TEMP_END[$i,$j]} < ${aBENCH_RESULT_CPU_TEMP_END_MIN[$i]}") )); then + + aBENCH_RESULT_CPU_TEMP_END_MIN[$i]=${aBENCH_CPU_TEMP_END[$i,$j]} + + fi + if (( $(bc -l <<< "scale=$BC_SCALE; ${aBENCH_CPU_TEMP_END[$i,$j]} > ${aBENCH_RESULT_CPU_TEMP_END_MAX[$i]}") )); then + + aBENCH_RESULT_CPU_TEMP_END_MAX[$i]=${aBENCH_CPU_TEMP_END[$i,$j]} + + fi + + # - Count up averages + aBENCH_RESULT_CPU_TEMP_END_AVG[$i]=$(bc -l <<< "${aBENCH_CPU_TEMP_END[$i,$j]} + ${aBENCH_RESULT_CPU_TEMP_END_AVG[$i]}") + + # - DEBUG + # echo ${aBENCH_ROOTFS_WRITE[$i,$j]} + # echo ${aBENCH_ROOTFS_READ[$i,$j]} + # echo ${aBENCH_RAM_WRITE[$i,$j]} + # echo ${aBENCH_RAM_READ[$i,$j]} + # echo ${aBENCH_CPU_TEMP_START[$i,$j]} + # echo ${aBENCH_CPU_TEMP_END[$i,$j]} + # - DEBUG + + # - Work out averages + if (( $j == ${aBENCH_INDEX[$i]} - 1 )); then + + aBENCH_RESULT_CPU_AVG[$i]=$(bc -l <<< "scale=$BC_SCALE; ${aBENCH_RESULT_CPU_AVG[$i]} / ${aBENCH_INDEX[$i]}") + aBENCH_RESULT_ROOTFS_WRITE_AVG[$i]=$(bc -l <<< "scale=$BC_SCALE; ${aBENCH_RESULT_ROOTFS_WRITE_AVG[$i]} / ${aBENCH_INDEX[$i]}") + aBENCH_RESULT_ROOTFS_READ_AVG[$i]=$(bc -l <<< "scale=$BC_SCALE; ${aBENCH_RESULT_ROOTFS_READ_AVG[$i]} / ${aBENCH_INDEX[$i]}") + aBENCH_RESULT_RAM_WRITE_AVG[$i]=$(bc -l <<< "scale=$BC_SCALE; ${aBENCH_RESULT_RAM_WRITE_AVG[$i]} / ${aBENCH_INDEX[$i]}") + aBENCH_RESULT_RAM_READ_AVG[$i]=$(bc -l <<< "scale=$BC_SCALE; ${aBENCH_RESULT_RAM_READ_AVG[$i]} / ${aBENCH_INDEX[$i]}") + aBENCH_RESULT_CPU_TEMP_START_AVG[$i]=$(bc -l <<< "scale=$BC_SCALE; ${aBENCH_RESULT_CPU_TEMP_START_AVG[$i]} / ${aBENCH_INDEX[$i]}") + aBENCH_RESULT_CPU_TEMP_END_AVG[$i]=$(bc -l <<< "scale=$BC_SCALE; ${aBENCH_RESULT_CPU_TEMP_END_AVG[$i]} / ${aBENCH_INDEX[$i]}") + + #DEBUG + echo -e "aBENCH_RESULT_CPU_AVG $i = ${aBENCH_RESULT_CPU_AVG[$i]}" + echo -e "aBENCH_RESULT_ROOTFS_WRITE_AVG $i = ${aBENCH_RESULT_ROOTFS_WRITE_AVG[$i]}" + echo -e "aBENCH_RESULT_ROOTFS_READ_AVG $i = ${aBENCH_RESULT_ROOTFS_READ_AVG[$i]}" + echo -e "aBENCH_RESULT_RAM_WRITE_AVG $i = ${aBENCH_RESULT_RAM_WRITE_AVG[$i]}" + echo -e "aBENCH_RESULT_RAM_READ_AVG $i = ${aBENCH_RESULT_RAM_READ_AVG[$i]}" + echo -e "aBENCH_RESULT_CPU_TEMP_START_AVG $i = ${aBENCH_RESULT_CPU_TEMP_START_AVG[$i]}" + echo -e "aBENCH_RESULT_CPU_TEMP_END_AVG $i = ${aBENCH_RESULT_CPU_TEMP_END_AVG[$i]}" + #DEBUG + + fi + + done + + fi + +done + +# cat << _EOF_ > /var/www/survey/index.html #DEBUG +cat << _EOF_ > /var/www/survey/index_test.html #DEBUG @@ -595,9 +754,56 @@ cat << _EOF_ > /var/www/survey/index.html $(for i in "${!aSOFTWARE[@]}"; do echo ""; done | sort -nrk 2 -t ' ')
$i ${aSOFTWARE[$i]}
+ + + +

DietPi-Benchmarks:

+ + + + + + + + + + + + + + + + $(for i in "${!aBENCH_INDEX[@]}"; do echo ""; done) +
+ HW_MODEL: + + Total benchmarks: + + CPU time average (Seconds): + + CPU time min(Seconds): + + CPU time max (Seconds): + + CPU temp idle avg ('c): + + CPU temp idle min ('c): + + CPU temp idle max ('c): + + CPU temp run avg ('c): + + CPU temp run min ('c): + + CPU temp run max ('c): +
$i ${#aBENCH_INDEX[$i]} ${aBENCH_RESULT_CPU_AVG[$i]} ${aBENCH_RESULT_CPU_MIN[$i]} ${aBENCH_RESULT_CPU_MAX[$i]} ${aBENCH_RESULT_CPU_TEMP_START_AVG[$i]} ${aBENCH_RESULT_CPU_TEMP_START_MIN[$i]} ${aBENCH_RESULT_CPU_TEMP_START_MAX[$i]} ${aBENCH_RESULT_CPU_TEMP_END_AVG[$i]} ${aBENCH_RESULT_CPU_TEMP_END_MIN[$i]} ${aBENCH_RESULT_CPU_TEMP_END_MAX[$i]}
+ + + + _EOF_ # Clean up tmp ramfs -rm -R /tmp/dietpi-survey_report +#rm -R /tmp/dietpi-survey_report