Skip to content
Snippets Groups Projects
Commit 0d1bb7f2 authored by Vytor Calixto's avatar Vytor Calixto :space_invader:
Browse files

Add mais um plot para métricas do programa

Agora faz gráfico com os piores tempos
parent 23e23f91
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -12,13 +12,16 @@ test:
- make test
- cd tests
- gnuplot "tempos.plot"
- gnuplot medias.plot
- gnuplot "medias.plot"
- gnuplo "piores.plot"
artifacts:
paths:
- tests/tabuleiros.txt
- tests/tempos.txt
- tests/medias.txt
- tests/piores.txt
- tests/tempos.png
- tests/medias.png
- tests/piores.png
tags:
- ubuntu
set terminal png size 800,800
set output "piores.png"
filename="piores.txt"
from=system('tail -n +2 '.filename. '| cut -f 1 | sort -n | uniq')
select_source(w) = sprintf('< awk ''{if ($1 == "%s") print }'' %s', w, filename)
from2=system('tail -n +2 '.filename. '| cut -f 2 | sort -n | uniq')
select_source2(w) = sprintf('< awk ''{if ($2 == "%s") print }'' %s', w, filename)
set grid
set key
set style data linespoints
set pointintervalbox 3
set multiplot layout 2,1
set title "Piores tempo de execução\n considerando número de cores"
set xlabel "Cores"
set ylabel "Tempo médio (milisegundos)"
plot for [f in from] select_source(f) using 2:3 title f
set title "Piores tempo execução\n considerando tamanho do tabuleiro"
set xlabel "Tamanho do Tabuleiro"
plot for [f in from2] select_source2(f) using 1:3 title f
unset multiplot
......@@ -19,6 +19,7 @@ NC='\033[0m' # Sem cor
echo -ne "" > tabuleiros.txt
echo -ne "#Tam tabuleiro\t#N cores\t#Tempo médio\n" > tempos.txt
echo -ne "#Tam tabuleiro\t#Tempo médio\n" > medias.txt
echo -ne "#Tam tabuleiro\t#N cores\t#Tempo médio\n" > piores.txt
echo "Iniciado testes"
for i in ${tams[*]}
......@@ -64,6 +65,7 @@ do
printf "%03d" ${M_medio_cor}
echo -e "s (${T_medio_cor})${NC}\n"
echo -e "${i}\t${cor}\t${M_medio_cor}" >> tempos.txt
echo -e "${i}\t${cor}\t$(($T_max_cor/1000000))" >> piores.txt
done
T_medio_total=$(( $T_soma_total/($i * ${#cores[*]}) ))
S_medio_total=$(($T_medio_total/1000000000))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment