added chart

This commit is contained in:
olli 2023-10-28 14:38:15 +02:00
parent 704547344b
commit 9ebe8e1bb5

View File

@ -2,7 +2,9 @@
. /etc/bash/gaboshlib.include . /etc/bash/gaboshlib.include
# Chart Part
. dabo/functions/genchart.sh . dabo/functions/genchart.sh
# Chart Part End
g_nice g_nice
@ -150,7 +152,21 @@ do
analyze ${file} analyze ${file}
fi fi
# Chart Part done
if [ "${ANALYZE_BATCH}" -eq "0" ]
then
export -f g_echo_note
export g_tmp
export analyzedate
. /tmp/parallel-$$
fi
# Chart Part
for file in $@
do
tmpfile=$(basename "${file}")
g_echo "generating chart for $file" g_echo "generating chart for $file"
echo "<html> echo "<html>
<head> <head>
@ -169,18 +185,10 @@ do
genchart analyze-${analyzedate}/chart-${tmpfile}.csv 500 8,6,7 >>analyze-${analyzedate}/chart-${tmpfile}.html genchart analyze-${analyzedate}/chart-${tmpfile}.csv 500 8,6,7 >>analyze-${analyzedate}/chart-${tmpfile}.html
echo "RSIs" >>analyze-${analyzedate}/chart-${tmpfile}.html echo "RSIs" >>analyze-${analyzedate}/chart-${tmpfile}.html
genchart analyze-${analyzedate}/chart-${tmpfile}.csv 500 10,11,12,14,15,16,17,13 >>analyze-${analyzedate}/chart-${tmpfile}.html genchart analyze-${analyzedate}/chart-${tmpfile}.csv 500 10,11,12,14,15,16,17,13 >>analyze-${analyzedate}/chart-${tmpfile}.html
# Chart Part End
echo "</body></html>">>analyze-${analyzedate}/chart-${tmpfile}.html echo "</body></html>">>analyze-${analyzedate}/chart-${tmpfile}.html
done done
# Chart Part End
if [ "${ANALYZE_BATCH}" -eq "0" ]
then
export -f g_echo_note
export g_tmp
export analyzedate
. /tmp/parallel-$$
fi
analyzecounter=$(cat ${g_tmp}/overall-result-* | egrep -v "^0$" | wc -l) analyzecounter=$(cat ${g_tmp}/overall-result-* | egrep -v "^0$" | wc -l)
echo "OVERALL RESULT (average): $(cat ${g_tmp}/overall-result-* | awk "{ SUM += \$1 / ${analyzecounter} } END { printf(\"%2.2f\", SUM) }")%" | tee analyze-${analyzedate}/overall-result.log echo "OVERALL RESULT (average): $(cat ${g_tmp}/overall-result-* | awk "{ SUM += \$1 / ${analyzecounter} } END { printf(\"%2.2f\", SUM) }")%" | tee analyze-${analyzedate}/overall-result.log