Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
9.2.2023: Due to updates GitLab will be unavailable for some minutes between 9:00 and 11:00.
Open sidebar
i7
peregrine
Commits
d1aa12ec
Commit
d1aa12ec
authored
May 16, 2017
by
Philipp Meyer
Browse files
Fix script for generating benchmark table
parent
99973a5a
Changes
4
Hide whitespace changes
Inline
Side-by-side
benchmarks/Makefile
View file @
d1aa12ec
all
:
main.pdf
program
:
pp-print
@
echo
'Compiling pp-print'
@
$(MAKE)
-C
pp-print
...
...
@@ -9,13 +11,13 @@ peregrine:
protocols
:
program
@
./generate_protocols.sh
results
:
protocols peregrine
results
/results.csv
:
protocols peregrine
@
./run_benchmarks.sh
table.tex
:
results
table.tex
:
results
/results.csv
python3 make_table.py
>
table.tex
pdf
:
table.tex
main.
pdf
:
table.tex
pdflatex main.tex
clean
:
...
...
benchmarks/main.tex
View file @
d1aa12ec
...
...
@@ -14,7 +14,7 @@
$
|Q|
$
&
Number of states.
\\
$
|T|
$
&
Number of non-silent transitions.
\\
termination
&
Time in seconds to prove layered termination.
\\
$
|
\mathcal
{
P
}
|
$
&
Number of
block
s in the partition for layered termination.
\\
$
|
\mathcal
{
P
}
|
$
&
Number of
layer
s in the partition for layered termination.
\\
consensus
&
Time in seconds to prove strong consensus.
\\
$
|
\mathcal
{
R
}
|
$
&
Number of refinement steps (i.e.
\
number of traps or siphons) for strong consensus.
\\
total
&
Time in seconds to prove layered termination and strong consensus.
\\
...
...
benchmarks/make_table.py
View file @
d1aa12ec
...
...
@@ -10,7 +10,8 @@ prop_steps = [ '$|\mathcal{P}|$', '$|R|$' ]
max_params
=
2
long_table
=
True
short_table
=
True
short_table
=
False
if
len
(
sys
.
argv
)
>=
2
:
long_table
=
False
short_table
=
False
...
...
@@ -87,9 +88,9 @@ if long_table:
for
i
in
range
(
len
(
params
),
max_params
):
row_string
+=
" &"
n_
plac
es
=
row
[
'
plac
es'
]
n_
stat
es
=
row
[
'
stat
es'
]
n_transitions
=
row
[
'transitions'
]
row_string
+=
' & %d & %d'
%
(
n_
plac
es
,
n_transitions
)
row_string
+=
' & %d & %d'
%
(
n_
stat
es
,
n_transitions
)
total_time
=
0.0
total_timeout
=
False
...
...
@@ -166,9 +167,9 @@ if short_table:
val
=
params
[
0
][
1
:]
row_string
+=
"%s "
%
val
n_
plac
es
=
row
[
'
plac
es'
]
n_
stat
es
=
row
[
'
stat
es'
]
n_transitions
=
row
[
'transitions'
]
row_string
+=
' & %d & %d'
%
(
n_
plac
es
,
n_transitions
)
row_string
+=
' & %d & %d'
%
(
n_
stat
es
,
n_transitions
)
total_time
=
0.0
total_timeout
=
False
...
...
benchmarks/run_benchmarks.sh
View file @
d1aa12ec
...
...
@@ -21,7 +21,7 @@ mkdir -p $benchmark_dir/$out_dir
mkdir
-p
$benchmark_dir
/
$results_dir
>
$benchmark_dir
/
$results_dir
/results.csv
echo
-n
"protocol,file,
plac
es,transitions"
>>
$benchmark_dir
/
$results_dir
/results.csv
echo
-n
"protocol,file,
stat
es,transitions"
>>
$benchmark_dir
/
$results_dir
/results.csv
for
((
propi
=
0
;
propi<
${#
properties
[@]
}
;
propi++
))
;
do
prop
=
${
properties
[
$propi
]
}
...
...
@@ -51,9 +51,9 @@ for protocol_dir in $(find $benchmark_dir/$protocols_dir -mindepth 1 -maxdepth 1
(
$executable_dir
/
$executable
$options
$filename
2>&1 |
tee
$benchmark_dir
/
$out_dir
/
$protocol
/
$file
.out
)
n_
plac
es
=
$(
grep
-e
'Number of
plac
es'
"
$benchmark_dir
/
$out_dir
/
$protocol
/
$file
.out"
|
sed
-e
's/^.*: \([0-9]*\)$/\1/'
)
n_
stat
es
=
$(
grep
-e
'Number of
stat
es'
"
$benchmark_dir
/
$out_dir
/
$protocol
/
$file
.out"
|
sed
-e
's/^.*: \([0-9]*\)$/\1/'
)
n_transitions
=
$(
grep
-e
'Number of transitions'
"
$benchmark_dir
/
$out_dir
/
$protocol
/
$file
.out"
|
sed
-e
's/^.*: \([0-9]*\)$/\1/'
)
echo
-n
",
$n_
plac
es
,
$n_transitions
"
>>
$benchmark_dir
/
$results_dir
/results.csv
echo
-n
",
$n_
stat
es
,
$n_transitions
"
>>
$benchmark_dir
/
$results_dir
/results.csv
for
((
propi
=
0
;
propi<
${#
properties
[@]
}
;
propi++
))
;
do
prop
=
${
properties
[
$propi
]
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment