Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Enchente
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Harbor Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Vytor Calixto
Enchente
Commits
1cff850e
Commit
1cff850e
authored
8 years ago
by
Vytor Calixto
Browse files
Options
Downloads
Patches
Plain Diff
Testes com plots melhores
parent
316387f3
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/runTests.sh
+9
-2
9 additions, 2 deletions
tests/runTests.sh
tests/tempos.plot
+14
-7
14 additions, 7 deletions
tests/tempos.plot
with
23 additions
and
9 deletions
tests/runTests.sh
+
9
−
2
View file @
1cff850e
...
...
@@ -7,7 +7,7 @@ tempo_max=10000 #10s
tams
=(
4 8 16 25 32 50 64 75 100 128
)
# lista de cores
cores
=(
2 3 4 5 6 7 8
)
cores
=(
2 3 4 5 6 7 8
16 32
)
#-- Cores do terminal
RED
=
'\033[0;31m'
...
...
@@ -29,9 +29,12 @@ do
do
echo
"Número de cores:
${
cor
}
"
T_soma_cor
=
0
T_max_cor
=
0
for
j
in
$(
seq
1
$i
)
do
echo
-ne
"Tabuleiro com
${
i
}
linhas e
${
cor
}
cores
${
i
}
x
${
j
}
"
\\
r
echo
-ne
"Tabuleiro com
${
i
}
linhas e
${
cor
}
cores:
${
i
}
x
${
j
}
(T max:
$((
$T_max_cor
/
1000000000
))
."
printf
"%03d"
$((
$T_max_cor
/
1000000
))
echo
-ne
")"
\\
r
semente
=
$RANDOM
# echo "Usando semente: ${semente}"
./test
$i
$j
$cor
$semente
...
...
@@ -44,6 +47,10 @@ do
S
=
$((
$T_gasto
/
1000000000
))
# tempo em milisegundos
M
=
$((
$T_gasto
/
1000000
))
# tempo máximo por cor
if
[
$T_max_cor
-lt
$T_gasto
]
;
then
T_max_cor
=
$T_gasto
fi
if
((
$M
>
$tempo_max
))
;
then
echo
-e
"
\n
${
RED
}
Tabuleiro
${
i
}
${
j
}
${
cor
}
${
semente
}
levou mais de
${
tempo_max
}
milisegundos:
${
S
}
.
${
M
}
s
${
NC
}
"
echo
"
${
i
}
${
j
}
${
cor
}
${
semente
}
"
>>
tabuleiros.txt
...
...
This diff is collapsed.
Click to expand it.
tests/tempos.plot
+
14
−
7
View file @
1cff850e
set terminal png
set terminal png
size 800,800
set output "tempos.png"
set xlabel "Cores"
set ylabel "Tempo (milisegundos)"
set title "Tempo médio para execução considerando número de cores e tamanho do tabuleiro"
filename="tempos.txt"
from=system('tail -n +2 '.filename. '| cut -f 1 | sort | uniq')
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 "Tempo médio para 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 "Tempo médio para 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
#plot "tempos.txt" using 1:3 with points lc rgb "#602b7d" lw 2 title "Tamanho do tabuleiro",\
# "tempos.txt" using 2:3 with points lc rgb "#19e287" lw 2 title "Número de cores"
unset multiplot
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment